diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-04-06 13:31:45 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-04-06 13:31:45 +0000 |
commit | 26d9b02fa65570745e70dcbd0d92c1354fc4ecff (patch) | |
tree | ae2db66c225f4f6f1bc57a6588774da590a98fcf | |
parent | d835aa991e488d789654708a6729f9b9f5a81fb2 (diff) | |
download | perl-26d9b02fa65570745e70dcbd0d92c1354fc4ecff.tar.gz |
Integrate changes #9584,9587 from maintperl into mainline.
keep eval"" CVs alive until the end of the statement in which
they're called
add README.macos (from Chris Nandor)
tyop in change#9555
p4raw-link: @9587 on //depot/maint-5.6/perl: d72c2fc956b5cb46ede17d06f89a463c78f1cf5f
p4raw-link: @9584 on //depot/maint-5.6/perl: e6fbcc36a54a8afd8dbcdcb9a8d8e178df530b97
p4raw-link: @9555 on //depot/perl: 6a0af2f17bcde4767b90a72eff7083c5effff21d
p4raw-id: //depot/perl@9588
p4raw-branched: from //depot/maint-5.6/perl@9583 'branch in'
README.macos
p4raw-integrated: from //depot/maint-5.6/perl@9583 'copy in'
pod/perlfaq9.pod (@9585..) 'merge in' scope.h (@8568..)
pod/perl.pod (@8986..) MANIFEST (@9227..) win32/Makefile
(@9286..) pp_ctl.c scope.c (@9288..) global.sym (@9289..)
embed.h embed.pl objXSUB.h perlapi.c proto.h (@9292..)
pod/buildtoc.PL (@9312..) win32/makefile.mk (@9495..) sv.c
(@9496..) pod/perlguts.pod (@9514..)
-rw-r--r-- | MANIFEST | 1 | ||||
-rw-r--r-- | README.macos | 60 | ||||
-rw-r--r-- | embed.h | 4 | ||||
-rwxr-xr-x | embed.pl | 1 | ||||
-rw-r--r-- | global.sym | 1 | ||||
-rw-r--r-- | objXSUB.h | 4 | ||||
-rw-r--r-- | perlapi.c | 7 | ||||
-rw-r--r-- | pod/buildtoc.PL | 2 | ||||
-rw-r--r-- | pod/perl.pod | 1 | ||||
-rw-r--r-- | pod/perlfaq9.pod | 2 | ||||
-rw-r--r-- | pod/perlguts.pod | 16 | ||||
-rw-r--r-- | pp_ctl.c | 2 | ||||
-rw-r--r-- | proto.h | 1 | ||||
-rw-r--r-- | scope.c | 12 | ||||
-rw-r--r-- | scope.h | 2 | ||||
-rw-r--r-- | sv.c | 1 | ||||
-rw-r--r-- | win32/Makefile | 16 | ||||
-rw-r--r-- | win32/makefile.mk | 13 |
18 files changed, 134 insertions, 12 deletions
@@ -47,6 +47,7 @@ README.epoc Notes about EPOC port README.hpux Notes about HP-UX port README.hurd Notes about GNU/Hurd port README.machten Notes about Power MachTen port +README.macos Notes about Mac OS (Classic) README.micro Notes about microperl README.mint Notes about Atari MiNT port README.mpeix Notes about MPE/iX port diff --git a/README.macos b/README.macos new file mode 100644 index 0000000000..cc8121be1c --- /dev/null +++ b/README.macos @@ -0,0 +1,60 @@ +If you read this file _as_is_, just ignore the funny characters you see. +It is written in the POD format (see pod/perlpod.pod) which is specially +designed to be readable as is. + +=head1 NAME + +README.macos - Perl under Mac OS (Classic) + + +=head1 SYNOPSIS + +This document briefly describes perl under Mac OS (Classic). +If you are running perl under Mac OS X, you don't want to be +here (unless you are in the Classic environment under Mac OS X). + +When we say "Mac OS" below, we mean pre-Mac OS X, which includes +Mac OS 7, 8, and 9. + + +=head1 DESCRIPTION + +The perl 5.6.1 source itself builds on Mac OS, with some additional +pieces. Support for Mac OS is now in the perl core, and MacPerl will be +able to, in the future, keep in closer sync with regular perl releases. + +At this time, though, it is very buggy, and is under development. An +alpha release is coming very soon. + +To build perl for Mac OS (as an MPW tool), you will need the addition +of the "macos" subdirectory, distributed separately. It includes extra +source files, config files, and make files. It also includes a lot of +extra Mac-specific modules. + +To build the MacPerl application, you will also need the "macperl" +directory, which includes the source files for creating the +application itself. + +All of this is also available from the SourceForge site, via +HTTP, FTP, and anonymous CVS. + + http://macperl.sourceforge.net/ + +You will also need compilers and libraries, all of them freely +available. These are linked to from the SourceForge site. Go that site +for all things having to do with MacPerl development. + +MacPerl 5.2.0r4 is available on the CPAN and on SourceForge. It +is based on perl 5.004. + + +=head1 AUTHOR + +perl was ported to Mac OS by Matthias Neeracher +E<lt>neeracher@mac.comE<gt>. It is currently maintained by Chris +Nandor E<lt>pudge@pobox.comE<gt>. + + +=head1 DATE + +Last modified 2001.04.05. @@ -599,6 +599,7 @@ #define save_iv Perl_save_iv #define save_list Perl_save_list #define save_long Perl_save_long +#define save_mortalizesv Perl_save_mortalizesv #define save_nogv Perl_save_nogv #define save_op Perl_save_op #define save_scalar Perl_save_scalar @@ -2090,6 +2091,7 @@ #define save_iv(a) Perl_save_iv(aTHX_ a) #define save_list(a,b) Perl_save_list(aTHX_ a,b) #define save_long(a) Perl_save_long(aTHX_ a) +#define save_mortalizesv(a) Perl_save_mortalizesv(aTHX_ a) #define save_nogv(a) Perl_save_nogv(aTHX_ a) #define save_op() Perl_save_op(aTHX) #define save_scalar(a) Perl_save_scalar(aTHX_ a) @@ -4099,6 +4101,8 @@ #define save_list Perl_save_list #define Perl_save_long CPerlObj::Perl_save_long #define save_long Perl_save_long +#define Perl_save_mortalizesv CPerlObj::Perl_save_mortalizesv +#define save_mortalizesv Perl_save_mortalizesv #define Perl_save_nogv CPerlObj::Perl_save_nogv #define save_nogv Perl_save_nogv #define Perl_save_op CPerlObj::Perl_save_op @@ -1956,6 +1956,7 @@ Ap |void |save_item |SV* item Ap |void |save_iv |IV* iv Ap |void |save_list |SV** sarg|I32 maxsarg Ap |void |save_long |long* longp +Ap |void |save_mortalizesv|SV* sv Ap |void |save_nogv |GV* gv p |void |save_op Ap |SV* |save_scalar |GV* gv diff --git a/global.sym b/global.sym index 1895fbfb58..08f3d5e48c 100644 --- a/global.sym +++ b/global.sym @@ -358,6 +358,7 @@ Perl_save_item Perl_save_iv Perl_save_list Perl_save_long +Perl_save_mortalizesv Perl_save_nogv Perl_save_scalar Perl_save_pptr @@ -1433,6 +1433,10 @@ #define Perl_save_long pPerl->Perl_save_long #undef save_long #define save_long Perl_save_long +#undef Perl_save_mortalizesv +#define Perl_save_mortalizesv pPerl->Perl_save_mortalizesv +#undef save_mortalizesv +#define save_mortalizesv Perl_save_mortalizesv #undef Perl_save_nogv #define Perl_save_nogv pPerl->Perl_save_nogv #undef save_nogv @@ -2610,6 +2610,13 @@ Perl_save_long(pTHXo_ long* longp) ((CPerlObj*)pPerl)->Perl_save_long(longp); } +#undef Perl_save_mortalizesv +void +Perl_save_mortalizesv(pTHXo_ SV* sv) +{ + ((CPerlObj*)pPerl)->Perl_save_mortalizesv(sv); +} + #undef Perl_save_nogv void Perl_save_nogv(pTHXo_ GV* gv) diff --git a/pod/buildtoc.PL b/pod/buildtoc.PL index 140341bb40..dbe88afec0 100644 --- a/pod/buildtoc.PL +++ b/pod/buildtoc.PL @@ -160,6 +160,7 @@ if (-d "pod") { perlepoc perlhpux perlmachten + perlmacos perlmpeix perlos2 perlos390 @@ -179,6 +180,7 @@ if (-d "pod") { perlepoc perlhpux perlmachten + perlmacos perlmpeix perlos2 perlos390 diff --git a/pod/perl.pod b/pod/perl.pod index fd55b8d85f..3d0cbbe1b3 100644 --- a/pod/perl.pod +++ b/pod/perl.pod @@ -114,6 +114,7 @@ For ease of access, the Perl manual has been split up into several sections: perlepoc Perl notes for EPOC perlhpux Perl notes for HP-UX perlmachten Perl notes for Power MachTen + perlmacos Perl notes for Mac OS (Classic) perlmpeix Perl notes for MPE/iX perlos2 Perl notes for OS/2 perlos390 Perl notes for OS/390 diff --git a/pod/perlfaq9.pod b/pod/perlfaq9.pod index 2609c4482e..96763802c5 100644 --- a/pod/perlfaq9.pod +++ b/pod/perlfaq9.pod @@ -394,7 +394,7 @@ the MIME/QP encoding. Decoding BASE64 becomes as simple as: use MIME::Base64; $decoded = decode_base64($encoded); -The MIME-Tools package (available from CPAN) support exctraction with +The MIME-Tools package (available from CPAN) supports extraction with decoding of BASE64 encoded attachments and content directly from email messages. diff --git a/pod/perlguts.pod b/pod/perlguts.pod index dad868a712..3b10af9eee 100644 --- a/pod/perlguts.pod +++ b/pod/perlguts.pod @@ -1127,8 +1127,20 @@ and back. =item C<SAVEFREESV(SV *sv)> The refcount of C<sv> would be decremented at the end of -I<pseudo-block>. This is similar to C<sv_2mortal>, which should (?) be -used instead. +I<pseudo-block>. This is similar to C<sv_2mortal> in that it is also a +mechanism for doing a delayed C<SvREFCNT_dec>. However, while C<sv_2mortal> +extends the lifetime of C<sv> until the beginning of the next statement, +C<SAVEFREESV> extends it until the end of the enclosing scope. These +lifetimes can be wildly different. + +Also compare C<SAVEMORTALIZESV>. + +=item C<SAVEMORTALIZESV(SV *sv)> + +Just like C<SAVEFREESV>, but mortalizes C<sv> at the end of the current +scope instead of decrementing its reference count. This usually has the +effect of keeping C<sv> alive until the statement that called the currently +live scope has finished executing. =item C<SAVEFREEOP(OP *op)> @@ -2866,7 +2866,7 @@ S_doeval(pTHX_ int gimme, OP** startop) CvOUTSIDE(PL_compcv) = (CV*)SvREFCNT_inc(caller); } - SAVEFREESV(PL_compcv); + SAVEMORTALIZESV(PL_compcv); /* must remain until end of current statement */ /* make sure we compile in the right package */ @@ -676,6 +676,7 @@ PERL_CALLCONV void Perl_save_item(pTHX_ SV* item); PERL_CALLCONV void Perl_save_iv(pTHX_ IV* iv); PERL_CALLCONV void Perl_save_list(pTHX_ SV** sarg, I32 maxsarg); PERL_CALLCONV void Perl_save_long(pTHX_ long* longp); +PERL_CALLCONV void Perl_save_mortalizesv(pTHX_ SV* sv); PERL_CALLCONV void Perl_save_nogv(pTHX_ GV* gv); PERL_CALLCONV void Perl_save_op(pTHX); PERL_CALLCONV SV* Perl_save_scalar(pTHX_ GV* gv); @@ -504,6 +504,14 @@ Perl_save_freesv(pTHX_ SV *sv) } void +Perl_save_mortalizesv(pTHX_ SV *sv) +{ + SSCHECK(2); + SSPUSHPTR(sv); + SSPUSHINT(SAVEt_MORTALIZESV); +} + +void Perl_save_freeop(pTHX_ OP *o) { SSCHECK(2); @@ -803,6 +811,10 @@ Perl_leave_scope(pTHX_ I32 base) ptr = SSPOPPTR; SvREFCNT_dec((SV*)ptr); break; + case SAVEt_MORTALIZESV: + ptr = SSPOPPTR; + sv_2mortal((SV*)ptr); + break; case SAVEt_FREEOP: ptr = SSPOPPTR; if (PL_comppad) @@ -34,6 +34,7 @@ #define SAVEt_COMPPAD 33 #define SAVEt_GENERIC_PVREF 34 #define SAVEt_PADSV 35 +#define SAVEt_MORTALIZESV 36 #ifndef SCOPE_SAVES_SIGNAL_MASK #define SCOPE_SAVES_SIGNAL_MASK 0 @@ -108,6 +109,7 @@ Closing bracket on a callback. See C<ENTER> and L<perlcall>. #define SAVEVPTR(s) save_vptr((void*)&(s)) #define SAVEPADSV(s) save_padsv(s) #define SAVEFREESV(s) save_freesv((SV*)(s)) +#define SAVEMORTALIZESV(s) save_mortalizesv((SV*)(s)) #define SAVEFREEOP(o) save_freeop(SOFT_CAST(OP*)(o)) #define SAVEFREEPV(p) save_freepv(SOFT_CAST(char*)(p)) #define SAVECLEARSV(sv) save_clearsv(SOFT_CAST(SV**)&(sv)) @@ -8531,6 +8531,7 @@ Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl) TOPIV(nss,ix) = iv; break; case SAVEt_FREESV: + case SAVEt_MORTALIZESV: sv = (SV*)POPPTR(ss,ix); TOPPTR(nss,ix) = sv_dup_inc(sv); break; diff --git a/win32/Makefile b/win32/Makefile index 429569e788..f7eda74ed6 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -1038,16 +1038,18 @@ utils: $(PERLEXE) $(X2P) cd ..\pod copy ..\README.aix .\perlaix.pod copy ..\README.amiga .\perlamiga.pod + copy ..\README.bs2000 .\perlbs2000.pod copy ..\README.cygwin .\perlcygwin.pod copy ..\README.dos .\perldos.pod copy ..\README.epoc .\perlepoc.pod copy ..\README.hpux .\perlhpux.pod copy ..\README.machten .\perlmachten.pod + copy ..\README.macos .\perlmacos.pod + copy ..\README.mpeix .\perlmpeix.pod copy ..\README.os2 .\perlos2.pod copy ..\README.os390 .\perlos390.pod - copy ..\README.vmesa .\perlvmesa.pod - copy ..\README.bs2000 .\perlbs2000.pod copy ..\README.solaris .\perlsolaris.pod + copy ..\README.vmesa .\perlvmesa.pod copy ..\vms\perlvms.pod .\perlvms.pod copy ..\README.vos .\perlvos.pod copy ..\README.win32 .\perlwin32.pod @@ -1097,8 +1099,14 @@ distclean: clean -rmdir /s $(LIBDIR)\MIME\Base64 -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME -rmdir /s $(LIBDIR)\MIME - -del /f $(PODDIR)\*.html - -del /f $(PODDIR)\*.bat + cd $(PODDIR) + -del /f *.html + -del /f *.bat + -del /f checkpods perlamiga.pod perlcygwin.pod \ + perldos.pod perlhpux.pod perlmachten.pod perlmacos.pod \ + perlmpeix.pod perlos2.pod perlvms.pod \ + perlwin32.pod pod2html pod2latex pod2man pod2text pod2usage \ + podchecker podselect cd ..\utils -del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc dprofpp -del /f *.bat diff --git a/win32/makefile.mk b/win32/makefile.mk index 499453bcaf..5333ce650c 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -1085,16 +1085,18 @@ utils: $(PERLEXE) $(X2P) cd ..\utils && $(MAKE) PERL=$(MINIPERL) copy ..\README.aix ..\pod\perlaix.pod copy ..\README.amiga ..\pod\perlamiga.pod + copy ..\README.bs2000 ..\pod\perlbs2000.pod copy ..\README.cygwin ..\pod\perlcygwin.pod copy ..\README.dos ..\pod\perldos.pod copy ..\README.epoc ..\pod\perlepoc.pod copy ..\README.hpux ..\pod\perlhpux.pod copy ..\README.machten ..\pod\perlmachten.pod + copy ..\README.macos ..\pod\perlmacos.pod + copy ..\README.mpeix ..\pod\perlmpeix.pod copy ..\README.os2 ..\pod\perlos2.pod copy ..\README.os390 ..\pod\perlos390.pod + copy ..\README.solaris .\perlsolaris.pod copy ..\README.vmesa ..\pod\perlvmesa.pod - copy ..\README.bs2000 ..\pod\perlbs2000.pod - copy ..\README.solaris ..\pod\perlsolaris.pod copy ..\vms\perlvms.pod ..\pod\perlvms.pod copy ..\README.vos ..\pod\perlvos.pod copy ..\README.win32 ..\pod\perlwin32.pod @@ -1132,8 +1134,11 @@ distclean: clean -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest || rmdir /s $(LIBDIR)\Digest -if exist $(LIBDIR)\MIME\Base64 rmdir /s /q $(LIBDIR)\MIME\Base64 || rmdir /s $(LIBDIR)\MIME\Base64 -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME || rmdir /s $(LIBDIR)\MIME - -del /f $(PODDIR)\*.html - -del /f $(PODDIR)\*.bat + -cd $(PODDIR) && del /f *.html *.bat checkpods perlamiga.pod \ + perlcygwin.pod perldos.pod perlhpux.pod perlmachten.pod \ + perlmacos.pod perlmpeix.pod \ + perlos2.pod perlvms.pod perlwin32.pod pod2html pod2latex \ + pod2man pod2text pod2usage podchecker podselect -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc \ dprofpp *.bat -cd ..\x2p && del /f find2perl s2p *.bat |