From: Gurusamy Sarathy Date: Sun, 10 Oct 1999 20:42:40 +0000 (+0000) Subject: revert SAVEDESTRUCTOR() to accepting void(*)(void*) for source X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c76ac1ee16c5c9591d8ffad5a0651b7f81738b68;p=p5sagit%2Fp5-mst-13.2.git revert SAVEDESTRUCTOR() to accepting void(*)(void*) for source compatibility; introduce SAVEDESTRUCTOR_X() that accepts void(*)(pTHX_ void*) p4raw-id: //depot/perl@4339 --- diff --git a/embed.h b/embed.h index fa457d2..18953ae 100644 --- a/embed.h +++ b/embed.h @@ -540,6 +540,7 @@ #define save_clearsv Perl_save_clearsv #define save_delete Perl_save_delete #define save_destructor Perl_save_destructor +#define save_destructor_x Perl_save_destructor_x #define save_freesv Perl_save_freesv #define save_freeop Perl_save_freeop #define save_freepv Perl_save_freepv @@ -1899,6 +1900,7 @@ #define save_clearsv(a) Perl_save_clearsv(aTHX_ a) #define save_delete(a,b,c) Perl_save_delete(aTHX_ a,b,c) #define save_destructor(a,b) Perl_save_destructor(aTHX_ a,b) +#define save_destructor_x(a,b) Perl_save_destructor_x(aTHX_ a,b) #define save_freesv(a) Perl_save_freesv(aTHX_ a) #define save_freeop(a) Perl_save_freeop(aTHX_ a) #define save_freepv(a) Perl_save_freepv(aTHX_ a) @@ -3730,6 +3732,8 @@ #define save_delete Perl_save_delete #define Perl_save_destructor CPerlObj::Perl_save_destructor #define save_destructor Perl_save_destructor +#define Perl_save_destructor_x CPerlObj::Perl_save_destructor_x +#define save_destructor_x Perl_save_destructor_x #define Perl_save_freesv CPerlObj::Perl_save_freesv #define save_freesv Perl_save_freesv #define Perl_save_freeop CPerlObj::Perl_save_freeop diff --git a/embed.pl b/embed.pl index 9f90d53..e44ba23 100755 --- a/embed.pl +++ b/embed.pl @@ -1529,7 +1529,8 @@ p |void |save_aptr |AV** aptr p |AV* |save_ary |GV* gv p |void |save_clearsv |SV** svp p |void |save_delete |HV* hv|char* key|I32 klen -p |void |save_destructor|DESTRUCTORFUNC_t f|void* p +p |void |save_destructor|DESTRUCTORFUNC_NOCONTEXT_t f|void* p +p |void |save_destructor_x|DESTRUCTORFUNC_t f|void* p p |void |save_freesv |SV* sv p |void |save_freeop |OP* o p |void |save_freepv |char* pv diff --git a/ext/Devel/DProf/DProf.xs b/ext/Devel/DProf/DProf.xs index 69f0b89..220a1e2 100644 --- a/ext/Devel/DProf/DProf.xs +++ b/ext/Devel/DProf/DProf.xs @@ -561,7 +561,7 @@ XS(XS_DB_sub) sv_setiv( DBsingle, 0 ); /* disable DB single-stepping */ #endif - SAVEDESTRUCTOR(check_depth, (void*)depth); + SAVEDESTRUCTOR_X(check_depth, (void*)depth); depth++; prof_mark( OP_ENTERSUB ); diff --git a/global.sym b/global.sym index 7200c60..ecde292 100644 --- a/global.sym +++ b/global.sym @@ -465,6 +465,7 @@ Perl_save_ary Perl_save_clearsv Perl_save_delete Perl_save_destructor +Perl_save_destructor_x Perl_save_freesv Perl_save_freeop Perl_save_freepv diff --git a/mg.c b/mg.c index f72d287..b08cee3 100644 --- a/mg.c +++ b/mg.c @@ -48,7 +48,7 @@ S_save_magic(pTHX_ I32 mgs_ix, SV *sv) MGS* mgs; assert(SvMAGICAL(sv)); - SAVEDESTRUCTOR(restore_magic, (void*)mgs_ix); + SAVEDESTRUCTOR_X(restore_magic, (void*)mgs_ix); mgs = SSPTR(mgs_ix, MGS*); mgs->mgs_sv = sv; @@ -2004,7 +2004,7 @@ Perl_sighandler(int sig) if (flags & 1) { PL_savestack_ix += 5; /* Protect save in progress. */ o_save_i = PL_savestack_ix; - SAVEDESTRUCTOR(unwind_handler_stack, (void*)&flags); + SAVEDESTRUCTOR_X(unwind_handler_stack, (void*)&flags); } if (flags & 4) PL_markstack_ptr++; /* Protect mark. */ @@ -2102,7 +2102,7 @@ restore_magic(pTHXo_ void *p) if (PL_savestack_ix == mgs->mgs_ss_ix) { I32 popval = SSPOPINT; - assert(popval == SAVEt_DESTRUCTOR); + assert(popval == SAVEt_DESTRUCTOR_X); PL_savestack_ix -= 2; popval = SSPOPINT; assert(popval == SAVEt_ALLOC); diff --git a/objXSUB.h b/objXSUB.h index cd8f2d8..9620006 100644 --- a/objXSUB.h +++ b/objXSUB.h @@ -2706,6 +2706,10 @@ #define Perl_save_destructor pPerl->Perl_save_destructor #undef save_destructor #define save_destructor Perl_save_destructor +#undef Perl_save_destructor_x +#define Perl_save_destructor_x pPerl->Perl_save_destructor_x +#undef save_destructor_x +#define save_destructor_x Perl_save_destructor_x #undef Perl_save_freesv #define Perl_save_freesv pPerl->Perl_save_freesv #undef save_freesv diff --git a/perl.h b/perl.h index e8c9c1e..5baf49a 100644 --- a/perl.h +++ b/perl.h @@ -1766,7 +1766,8 @@ union any { I32 any_i32; IV any_iv; long any_long; - void (*any_dptr) (pTHXo_ void*); + void (*any_dptr) (void*); + void (*any_dxptr) (pTHXo_ void*); }; #endif @@ -2577,6 +2578,7 @@ typedef void (CPERLscope(*regfree_t)) (pTHX_ struct regexp* r); int Perl_yylex(pTHX_ YYSTYPE *lvalp, int *lcharp); #endif +typedef void (*DESTRUCTORFUNC_NOCONTEXT_t) (void*); typedef void (*DESTRUCTORFUNC_t) (pTHXo_ void*); typedef void (*SVFUNC_t) (pTHXo_ SV*); typedef I32 (*SVCOMPARE_t) (pTHXo_ SV*, SV*); diff --git a/perlapi.c b/perlapi.c index 0f20e54..ac38dff 100644 --- a/perlapi.c +++ b/perlapi.c @@ -3324,11 +3324,18 @@ Perl_save_delete(pTHXo_ HV* hv, char* key, I32 klen) #undef Perl_save_destructor void -Perl_save_destructor(pTHXo_ DESTRUCTORFUNC_t f, void* p) +Perl_save_destructor(pTHXo_ DESTRUCTORFUNC_NOCONTEXT_t f, void* p) { ((CPerlObj*)pPerl)->Perl_save_destructor(f, p); } +#undef Perl_save_destructor_x +void +Perl_save_destructor_x(pTHXo_ DESTRUCTORFUNC_t f, void* p) +{ + ((CPerlObj*)pPerl)->Perl_save_destructor_x(f, p); +} + #undef Perl_save_freesv void Perl_save_freesv(pTHXo_ SV* sv) diff --git a/perly.c b/perly.c index 9b619c9..0ed07fc 100644 --- a/perly.c +++ b/perly.c @@ -29,7 +29,22 @@ struct ysv { YYSTYPE oldyylval; }; -static void yydestruct(pTHXo_ void *ptr); +static void yydestruct(void *ptr); + +static void +yydestruct(void *ptr) +{ + struct ysv* ysave = (struct ysv*)ptr; + if (ysave->yyss) Safefree(ysave->yyss); + if (ysave->yyvs) Safefree(ysave->yyvs); + yydebug = ysave->oldyydebug; + yynerrs = ysave->oldyynerrs; + yyerrflag = ysave->oldyyerrflag; + yychar = ysave->oldyychar; + yyval = ysave->oldyyval; + yylval = ysave->oldyylval; + Safefree(ysave); +} #line 49 "perly.y" #if 0 /* get this from perly.h instead */ @@ -2479,23 +2494,3 @@ yyabort: yyaccept: return retval; } - -#ifdef PERL_OBJECT -#define NO_XSLOCKS -#include "XSUB.h" -#endif - -static void -yydestruct(pTHXo_ void *ptr) -{ - struct ysv* ysave = (struct ysv*)ptr; - if (ysave->yyss) Safefree(ysave->yyss); - if (ysave->yyvs) Safefree(ysave->yyvs); - yydebug = ysave->oldyydebug; - yynerrs = ysave->oldyynerrs; - yyerrflag = ysave->oldyyerrflag; - yychar = ysave->oldyychar; - yyval = ysave->oldyyval; - yylval = ysave->oldyylval; - Safefree(ysave); -} diff --git a/perly.y b/perly.y index c8163e1..93e5f77 100644 --- a/perly.y +++ b/perly.y @@ -39,7 +39,22 @@ struct ysv { YYSTYPE oldyylval; }; -static void yydestruct(pTHXo_ void *ptr); +static void yydestruct(void *ptr); + +static void +yydestruct(void *ptr) +{ + struct ysv* ysave = (struct ysv*)ptr; + if (ysave->yyss) Safefree(ysave->yyss); + if (ysave->yyvs) Safefree(ysave->yyvs); + yydebug = ysave->oldyydebug; + yynerrs = ysave->oldyynerrs; + yyerrflag = ysave->oldyyerrflag; + yychar = ysave->oldyychar; + yyval = ysave->oldyyval; + yylval = ysave->oldyylval; + Safefree(ysave); +} %} diff --git a/perly_c.diff b/perly_c.diff index 7ade2f3..f42a10c 100644 --- a/perly_c.diff +++ b/perly_c.diff @@ -134,7 +134,7 @@ yyaccept: ! return (0); } ---- 2524,2570 ---- +--- 2524,2550 ---- #endif if (yyssp >= yyss + yystacksize - 1) { @@ -161,24 +161,4 @@ ! retval = 1; yyaccept: ! return retval; -! } -! -! #ifdef PERL_OBJECT -! #define NO_XSLOCKS -! #include "XSUB.h" -! #endif -! -! static void -! yydestruct(pTHXo_ void *ptr) -! { -! struct ysv* ysave = (struct ysv*)ptr; -! if (ysave->yyss) Safefree(ysave->yyss); -! if (ysave->yyvs) Safefree(ysave->yyvs); -! yydebug = ysave->oldyydebug; -! yynerrs = ysave->oldyynerrs; -! yyerrflag = ysave->oldyyerrflag; -! yychar = ysave->oldyychar; -! yyval = ysave->oldyyval; -! yylval = ysave->oldyylval; -! Safefree(ysave); } diff --git a/pod/perlguts.pod b/pod/perlguts.pod index d0f9167..a8d820e 100644 --- a/pod/perlguts.pod +++ b/pod/perlguts.pod @@ -1099,10 +1099,15 @@ this: SAVEDELETE(PL_defstash, savepv(tmpbuf), strlen(tmpbuf)); -=item C +=item C At the end of I the function C is called with the -only argument (of type C) C

. +only argument C

. + +=item C + +At the end of I the function C is called with the +implicit context argument (if any), and C

. =item C diff --git a/pod/perltoc.pod b/pod/perltoc.pod index 5842f18..dee5951 100644 --- a/pod/perltoc.pod +++ b/pod/perltoc.pod @@ -362,7 +362,7 @@ What does CPAN/src/... mean? =item Where can I get information on Perl? -=item What are the Perl newsgroups on USENET? Where do I post questions? +=item What are the Perl newsgroups on Usenet? Where do I post questions? =item Where should I post source code? @@ -377,7 +377,7 @@ References, Tutorials =item Perl on the Net: FTP and WWW Access -=item What mailing lists are there for perl? +=item What mailing lists are there for Perl? =item Archives of comp.lang.perl.misc @@ -446,9 +446,9 @@ References, Tutorials =item How can I get C<#!perl> to work on [MS-DOS,NT,...]? -=item Can I write useful perl programs on the command line? +=item Can I write useful Perl programs on the command line? -=item Why don't perl one-liners work on my DOS/Mac/VMS system? +=item Why don't Perl one-liners work on my DOS/Mac/VMS system? =item Where can I learn about CGI or Web programming in Perl? @@ -515,7 +515,7 @@ Trig functions? =item How do I find yesterday's date? -=item Does Perl have a year 2000 problem? Is Perl Y2K compliant? +=item Does Perl have a Year 2000 problem? Is Perl Y2K compliant? =back @@ -1089,7 +1089,7 @@ CGI script to do bad things? =item AUTHOR AND COPYRIGHT -=head2 perldelta - what's new for perl5.006 (as of 5.005_56) +=head2 perldelta - what's new for perl v5.6 (as of v5.005_62) =item DESCRIPTION @@ -1099,18 +1099,51 @@ CGI script to do bad things? =item Perl Source Incompatibilities +Treatment of list slices of undef has changed, Possibly changed +pseudo-random number generator, Hashing function for hash keys has changed, +C fails on read only values, Close-on-exec bit may be set on pipe() +handles, Writing C<"$$1"> to mean C<"${$}1"> is unsupported, values(%h) and +C<\(%h)> operate on aliases to values, not copies, vec(EXPR,OFFSET,BITS) +enforces powers-of-two BITS, Text of some diagnostic output has changed, +C<%@> has been removed + =item C Source Incompatibilities -C, C, C and C Issues +C, C, C, C +and C Issues =item Compatible C Source API Changes -C is now C +C is now C, Support for C++ exceptions =item Binary Incompatibilities =back +=item Installation and Configuration Improvements + +=over + +=item New Configure flags + +=item -Dusethreads and -Duse64bits now more daring + +=item Long Doubles + +=item -Dusemorebits + +=item -Duselargefiles + +=item installusrbinperl + +=item SOCKS support + +=item C<-A> flag + +=item New Installation Scheme + +=back + =item Core Changes =over @@ -1119,22 +1152,60 @@ C is now C =item Lexically scoped warning categories +=item Lvalue subroutines + +=item "our" declarations + +=item Weak references + =item Binary numbers supported +=item Some arrows may be omitted in calls through references + =item syswrite() ease-of-use +=item Filehandles can be autovivified + =item 64-bit support +=item Large file support + +=item "more bits" + =item Better syntax checks on parenthesized unary operators +=item POSIX character class syntax [: :] supported + =item Improved C operator =item pack() format 'Z' supported =item pack() format modifier '!' supported +=item pack() and unpack() support counted strings + +=item Comments in pack() templates + =item $^X variables may now have names longer than one character +=item C implicit in subroutine attributes + +=item Regular expression improvements + +=item Overloading improvements + +=item open() with more than two arguments + +=item Support for interpolating named characters + +=item Experimental support for user-hooks in @INC + +=item C and C may be overridden + +=item New variable $^C reflects C<-c> switch + +=item Optional Y2K warnings + =back =item Significant bug fixes @@ -1145,11 +1216,85 @@ C is now C =item C improvements +=item All compilation errors are true errors + =item Automatic flushing of output buffers +=item Better diagnostics on meaningless filehandle operations + +=item Where possible, buffered data discarded from duped input filehandle + +=item system(), backticks and pipe open now reflect exec() failure + +=item Implicitly closed filehandles are safer + +=item C<(\$)> prototype and C<$foo{a}> + +=item Pseudo-hashes work better + +=item C and AUTOLOAD + +=item C<-bareword> allowed under C + +=item Boolean assignment operators are legal lvalues + +=item C allowed + +=item Failures in DESTROY() + +=item Locale bugs fixed + +=item Memory leaks + +=item Spurious subroutine stubs after failed subroutine calls + +=item Consistent numeric conversions + +=item Taint failures under C<-U> + +=item END blocks and the C<-c> switch + +=item Potential to leak DATA filehandles + +=item Diagnostics follow STDERR + +=item Other fixes for better diagnostics + =back -=item Supported Platforms +=item Performance enhancements + +=over + +=item Simple sort() using { $a <=> $b } and the like are optimized + +=item Optimized assignments to lexical variables + +=item Method lookups optimized + +=item Faster mechanism to invoke XSUBs + +=item Perl_malloc() improvements + +=item Faster subroutine calls + +=back + +=item Platform specific changes + +=over + +=item Additional supported platforms + +=item DOS + +=item OS/2 + +=item VMS + +=item Win32 + +=back =item New tests @@ -1159,9 +1304,12 @@ C is now C =item Modules -Dumpvalue, Benchmark, Devel::Peek, Fcntl, File::Spec, -File::Spec::Functions, Math::BigInt, Math::Complex, Math::Trig, SDBM_File, -Time::Local, Win32, DBM Filters +attributes, B, ByteLoader, B, constant, charnames, Data::Dumper, DB, +DB_File, Devel::DProf, Dumpvalue, Benchmark, Devel::Peek, +ExtUtils::MakeMaker, Fcntl, File::Compare, File::Find, File::Spec, +File::Spec::Functions, Getopt::Long, IO, JPL, Math::BigInt, Math::Complex, +Math::Trig, Pod::Parser, Pod::Text and Pod::Man, SDBM_File, Time::Local, +Win32, DBM Filters =item Pragmata @@ -1169,20 +1317,67 @@ Time::Local, Win32, DBM Filters =item Utility Changes +=over + +=item h2ph + +=item perlcc + +=item h2xs + +=back + =item Documentation Changes -perlopentut.pod, perlreftut.pod, perltootc.pod +perlopentut.pod, perlreftut.pod, perltootc.pod, perlcompile.pod =item New Diagnostics -/%s/: Unrecognized escape \\%c passed through, Unrecognized escape \\%c -passed through, Missing command in piped open, defined(@array) is -deprecated (and not really meaningful), defined(%hash) is deprecated (and -not really meaningful) +"my sub" not yet implemented, '!' allowed only after types %s, / cannot +take a count, / must be followed by a, A or Z, / must be followed by a*, A* +or Z*, / must follow a numeric type, Repeat count in pack overflows, Repeat +count in unpack overflows, /%s/: Unrecognized escape \\%c passed through, +/%s/ should probably be written as "%s", %s() called too early to check +prototype, %s package attribute may clash with future reserved word: %s, + (in cleanup) %s, <> should be quotes, Attempt to join self, Bad +evalled substitution pattern, Bad realloc() ignored, Binary number > +0b11111111111111111111111111111111 non-portable, Bit vector size > 32 +non-portable, Buffer overflow in prime_env_iter: %s, Can't check filesystem +of script "%s", Can't modify non-lvalue subroutine call, Can't read CRTL +environ, Can't remove %s: %s, skipping file, Can't return %s from lvalue +subroutine, Can't weaken a nonreference, Character class [:%s:] unknown, +Character class syntax [%s] belongs inside character classes, Constant is +not %s reference, constant(%s): %%^H is not localized, constant(%s): %s, +defined(@array) is deprecated, defined(%hash) is deprecated, Did not +produce a valid header, Document contains no data, entering effective %s +failed, Filehandle %s opened only for output, Hexadecimal number > +0xffffffff non-portable, Ill-formed CRTL environ value "%s", Ill-formed +message in prime_env_iter: |%s|, Illegal binary digit %s, Illegal binary +digit %s ignored, Illegal number of bits in vec, Integer overflow in %s +number, Invalid %s attribute: %s, Invalid %s attributes: %s, Invalid +separator character %s in attribute list, Invalid separator character %s in +subroutine attribute list, leaving effective %s failed, Lvalue subs +returning %s not implemented yet, Method %s not permitted, Missing +%sbrace%s on \N{}, Missing command in piped open, Missing name in "my sub", +no UTC offset information; assuming local time is UTC, Octal number > +037777777777 non-portable, panic: del_backref, panic: kid popen errno read, +panic: magic_killbackrefs, Possible Y2K bug: %s, Premature end of script +headers, realloc() of freed memory ignored, Reference is already weak, +setpgrp can't take arguments, Strange *+?{} on zero-length expression, +switching effective %s is not implemented, This Perl can't reset CRTL +eviron elements (%s), This Perl can't set CRTL environ elements (%s=%s), +Unknown open() mode '%s', Unknown process %x sent message to +prime_env_iter: %s, Unrecognized escape \\%c passed through, Unterminated +attribute parameter in attribute list, Unterminated attribute list, +Unterminated attribute parameter in subroutine attribute list, Unterminated +subroutine attribute list, Value of CLI symbol "%s" too long, Version +number must be a constant number =item Obsolete Diagnostics -=item Configuration Changes +Character class syntax [: :] is reserved for future extensions, Ill-formed +logical name |%s| in prime_env_iter, regexp too big, Use of "$$" to +mean "${$}" is deprecated =item BUGS @@ -1343,6 +1538,8 @@ i, m, s, x =item Regular Expressions +cntrl, graph, print, punct, xdigit, + =item Extended Patterns C<(?#text)>, C<(?imsx-imsx)>, C<(?:pattern)>, C<(?imsx-imsx:pattern)>, @@ -1387,7 +1584,8 @@ B<-D>I, B<-e> I, B<-F>I, B<-h>, B<-i>[I], B<-I>I, B<-l>[I], B<-m>[B<->]I, B<-M>[B<->]I, B<-M>[B<->]I<'module ...'>, B<-[mM]>[B<->]I, B<-n>, B<-p>, B<-P>, B<-s>, B<-S>, -B<-T>, B<-u>, B<-U>, B<-v>, B<-V>, B<-V:>I, B<-w>, B<-x> I +B<-T>, B<-u>, B<-U>, B<-v>, B<-V>, B<-V:>I, B<-w>, B<-W>, B<-X>, +B<-x> I =back @@ -1449,12 +1647,13 @@ LABEL, last, lc EXPR, lc, lcfirst EXPR, lcfirst, length EXPR, length, link OLDFILE,NEWFILE, listen SOCKET,QUEUESIZE, local EXPR, localtime EXPR, lock, log EXPR, log, lstat FILEHANDLE, lstat EXPR, lstat, m//, map BLOCK LIST, map EXPR,LIST, mkdir FILENAME,MASK, msgctl ID,CMD,ARG, msgget KEY,FLAGS, -msgsnd ID,MSG,FLAGS, msgrcv ID,VAR,SIZE,TYPE,FLAGS, my EXPR, next LABEL, -next, no Module LIST, oct EXPR, oct, open FILEHANDLE,EXPR, open FILEHANDLE, -opendir DIRHANDLE,EXPR, ord EXPR, ord, pack TEMPLATE,LIST, package, package -NAMESPACE, pipe READHANDLE,WRITEHANDLE, pop ARRAY, pop, pos SCALAR, pos, -print FILEHANDLE LIST, print LIST, print, printf FILEHANDLE FORMAT, LIST, -printf FORMAT, LIST, prototype FUNCTION, push ARRAY,LIST, q/STRING/, +msgsnd ID,MSG,FLAGS, msgrcv ID,VAR,SIZE,TYPE,FLAGS, my EXPR, my EXPR : +ATTRIBUTES, next LABEL, next, no Module LIST, oct EXPR, oct, open +FILEHANDLE,MODE,EXPR, open FILEHANDLE,EXPR, open FILEHANDLE, opendir +DIRHANDLE,EXPR, ord EXPR, ord, our EXPR, pack TEMPLATE,LIST, package, +package NAMESPACE, pipe READHANDLE,WRITEHANDLE, pop ARRAY, pop, pos SCALAR, +pos, print FILEHANDLE LIST, print LIST, print, printf FILEHANDLE FORMAT, +LIST, printf FORMAT, LIST, prototype FUNCTION, push ARRAY,LIST, q/STRING/, qq/STRING/, qr/STRING/, qx/STRING/, qw/STRING/, quotemeta EXPR, quotemeta, rand EXPR, rand, read FILEHANDLE,SCALAR,LENGTH,OFFSET, read FILEHANDLE,SCALAR,LENGTH, readdir DIRHANDLE, readline EXPR, readlink EXPR, @@ -1475,20 +1674,20 @@ sort LIST, splice ARRAY,OFFSET,LENGTH,LIST, splice ARRAY,OFFSET,LENGTH, splice ARRAY,OFFSET, split /PATTERN/,EXPR,LIMIT, split /PATTERN/,EXPR, split /PATTERN/, split, sprintf FORMAT, LIST, sqrt EXPR, sqrt, srand EXPR, srand, stat FILEHANDLE, stat EXPR, stat, study SCALAR, study, sub BLOCK, -sub NAME, sub NAME BLOCK, substr EXPR,OFFSET,LEN,REPLACEMENT, substr -EXPR,OFFSET,LEN, substr EXPR,OFFSET, symlink OLDFILE,NEWFILE, syscall LIST, -sysopen FILEHANDLE,FILENAME,MODE, sysopen FILEHANDLE,FILENAME,MODE,PERMS, -sysread FILEHANDLE,SCALAR,LENGTH,OFFSET, sysread FILEHANDLE,SCALAR,LENGTH, -sysseek FILEHANDLE,POSITION,WHENCE, system LIST, system PROGRAM LIST, -syswrite FILEHANDLE,SCALAR,LENGTH,OFFSET, syswrite -FILEHANDLE,SCALAR,LENGTH, syswrite FILEHANDLE,SCALAR, tell FILEHANDLE, -tell, telldir DIRHANDLE, tie VARIABLE,CLASSNAME,LIST, tied VARIABLE, time, -times, tr///, truncate FILEHANDLE,LENGTH, truncate EXPR,LENGTH, uc EXPR, -uc, ucfirst EXPR, ucfirst, umask EXPR, umask, undef EXPR, undef, unlink -LIST, unlink, unpack TEMPLATE,EXPR, untie VARIABLE, unshift ARRAY,LIST, use -Module LIST, use Module, use Module VERSION LIST, use VERSION, utime LIST, -values HASH, vec EXPR,OFFSET,BITS, wait, waitpid PID,FLAGS, wantarray, warn -LIST, write FILEHANDLE, write EXPR, write, y/// +sub NAME, sub NAME BLOCK, substr EXPR,OFFSET,LENGTH,REPLACEMENT, substr +EXPR,OFFSET,LENGTH, substr EXPR,OFFSET, symlink OLDFILE,NEWFILE, syscall +LIST, sysopen FILEHANDLE,FILENAME,MODE, sysopen +FILEHANDLE,FILENAME,MODE,PERMS, sysread FILEHANDLE,SCALAR,LENGTH,OFFSET, +sysread FILEHANDLE,SCALAR,LENGTH, sysseek FILEHANDLE,POSITION,WHENCE, +system LIST, system PROGRAM LIST, syswrite FILEHANDLE,SCALAR,LENGTH,OFFSET, +syswrite FILEHANDLE,SCALAR,LENGTH, syswrite FILEHANDLE,SCALAR, tell +FILEHANDLE, tell, telldir DIRHANDLE, tie VARIABLE,CLASSNAME,LIST, tied +VARIABLE, time, times, tr///, truncate FILEHANDLE,LENGTH, truncate +EXPR,LENGTH, uc EXPR, uc, ucfirst EXPR, ucfirst, umask EXPR, umask, undef +EXPR, undef, unlink LIST, unlink, unpack TEMPLATE,EXPR, untie VARIABLE, +unshift ARRAY,LIST, use Module LIST, use Module, use Module VERSION LIST, +use VERSION, utime LIST, values HASH, vec EXPR,OFFSET,BITS, wait, waitpid +PID,FLAGS, wantarray, warn LIST, write FILEHANDLE, write EXPR, write, y/// =back @@ -1520,8 +1719,8 @@ $EFFECTIVE_USER_ID, $EUID, $>, $REAL_GROUP_ID, $GID, $(, $EFFECTIVE_GROUP_ID, $EGID, $), $PROGRAM_NAME, $0, $[, $PERL_VERSION, $], $COMPILING, $^C, $DEBUGGING, $^D, $SYSTEM_FD_MAX, $^F, $^H, $INPLACE_EDIT, $^I, $^M, $OSNAME, $^O, $PERLDB, $^P, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, -$^R, $^S, $BASETIME, $^T, $WARNING, $^W, $EXECUTABLE_NAME, $^X, $ARGV, -@ARGV, @INC, @_, %INC, %ENV, $ENV{expr}, %SIG, $SIG{expr} +$^R, $^S, $BASETIME, $^T, $WARNING, $^W, ${^Warnings}, $EXECUTABLE_NAME, +$^X, $ARGV, @ARGV, @INC, @_, %INC, %ENV, $ENV{expr}, %SIG, $SIG{expr} =item Error Indicators @@ -1545,6 +1744,8 @@ $^R, $^S, $BASETIME, $^T, $WARNING, $^W, $EXECUTABLE_NAME, $^X, $ARGV, =item Temporary Values via local() +=item Lvalue subroutines + =item Passing Symbol Table Entries (typeglobs) =item When to Still Use local() @@ -1563,6 +1764,8 @@ You want to temporarily change just one element of an array or hash =item Autoloading +=item Subroutine Attributes + =back =item SEE ALSO @@ -1597,9 +1800,9 @@ You want to temporarily change just one element of an array or hash =item Pragmatic Modules -attrs, autouse, base, blib, constant, diagnostics, fields, filetest, -integer, less, lib, locale, ops, overload, re, sigtrap, strict, subs, utf8, -vars, vmsish, warnings +attributes, attrs, autouse, base, blib, constant, diagnostics, fields, +filetest, integer, less, lib, locale, ops, overload, re, sigtrap, strict, +subs, utf8, vars, warnings, vmsish =item Standard Modules @@ -2582,7 +2785,10 @@ environment for DOS, OS/2, etc. C,C or C, Build instructions for Win32, -L, The ActiveState Pages, C +L, The ActiveState Pages, C, The +Cygwin environment for Win32; +L,C, The U/WIN +environment for Win32,C =item S @@ -2592,8 +2798,8 @@ C =item VMS -L, vmsperl list, C, vmsperl on the web, -C +L, L, vmsperl list, C, vmsperl +on the web, C =item VOS @@ -2602,15 +2808,19 @@ C =item EBCDIC Platforms -perl-mvs list, AS/400 Perl information at -C +L, L, L, perl-mvs list, AS/400 +Perl information at Cas well as on CPAN in +the F directory =item Acorn RISC OS =item Other perls -Atari, Guido Flohr's page C, HP 300 -MPE/iX C, Novell Netware +Amiga, L, Atari, L and Guido Flohr's web +pageC, Be OS, L, HP 300 +MPE/iX, L and Mark Bixby's web +pageC, Novell Netware, Plan 9, +L =back @@ -2649,10 +2859,11 @@ wait, waitpid PID,FLAGS =item CHANGES -v1.43, 24 May 1999, v1.42, 22 May 1999, v1.41, 19 May 1999, v1.40, 11 April -1999, v1.39, 11 February 1999, v1.38, 31 December 1998, v1.37, 19 December -1998, v1.36, 9 September 1998, v1.35, 13 August 1998, v1.33, 06 August -1998, v1.32, 05 August 1998, v1.30, 03 August 1998, v1.23, 10 July 1998 +v1.44, 19 July 1999, v1.43, 24 May 1999, v1.42, 22 May 1999, v1.41, 19 May +1999, v1.40, 11 April 1999, v1.39, 11 February 1999, v1.38, 31 December +1998, v1.37, 19 December 1998, v1.36, 9 September 1998, v1.35, 13 August +1998, v1.33, 06 August 1998, v1.32, 05 August 1998, v1.30, 03 August 1998, +v1.23, 10 July 1998 =item AUTHORS / CONTRIBUTORS @@ -2852,54 +3063,82 @@ B, B =item AUTHOR -=head2 perlxstut, perlXStut - Tutorial for XSUBs +=head2 perlxstut, perlXStut - Tutorial for writing XSUBs =item DESCRIPTION +=item SPECIAL NOTES + =over -=item VERSION CAVEAT +=item make + +=item Version caveat + +=item Dynamic Loading versus Static Loading + +=back + +=item TUTORIAL -=item DYNAMIC VERSUS STATIC +=over =item EXAMPLE 1 =item EXAMPLE 2 -=item WHAT HAS GONE ON? +=item What has gone on? -=item WRITING GOOD TEST SCRIPTS +=item Writing good test scripts =item EXAMPLE 3 -=item WHAT'S NEW HERE? +=item What's new here? -=item INPUT AND OUTPUT PARAMETERS +=item Input and Output Parameters -=item THE XSUBPP COMPILER +=item The XSUBPP Program -=item THE TYPEMAP FILE +=item The TYPEMAP file -=item WARNING +=item Warning about Output Arguments =item EXAMPLE 4 -=item WHAT HAS HAPPENED HERE? +=item What has happened here? -=item SPECIFYING ARGUMENTS TO XSUBPP +=item More about XSUBPP -=item THE ARGUMENT STACK +=item The Argument Stack -=item EXTENDING YOUR EXTENSION +=item Extending your Extension -=item DOCUMENTING YOUR EXTENSION +=item Documenting your Extension -=item INSTALLING YOUR EXTENSION +=item Installing your Extension -=item SEE ALSO +=item EXAMPLE 5 + +=item New Things in this Example + +=item EXAMPLE 6 (Coming Soon) + +=item EXAMPLE 7 (Coming Soon) + +=item EXAMPLE 8 (Coming Soon) + +=item EXAMPLE 9 (Coming Soon) + +=item Troubleshooting these Examples + +=back + +=item See also =item Author +=over + =item Last Changed =back @@ -2953,11 +3192,12 @@ B, B C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, -C, C, -C, C, C +*key, I32 length)>, C, C, C, +C, C, C, C, C, C, C, +C =back @@ -2999,6 +3239,18 @@ save_hptr(HV **hptr)> =back +=item The Perl Internal API + +=over + +=item Background and PERL_IMPLICIT_CONTEXT + +=item How do I use all this in extensions? + +=item Future Plans and PERL_IMPLICIT_SYS + +=back + =item API LISTING av_clear, av_extend, av_fetch, AvFILL, av_len, av_make, av_pop, av_push, @@ -3040,13 +3292,11 @@ SvSetSV, SvSetSV_nosteal, sv_setsv, sv_setsv_mg, sv_setuv, sv_setuv_mg, SvSTASH, SvTAINT, SvTAINTED, SvTAINTED_off, SvTAINTED_on, SVt_IV, SVt_PV, SVt_PVAV, SVt_PVCV, SVt_PVHV, SVt_PVMG, SVt_NV, SvTRUE, SvTYPE, svtype, PL_sv_undef, sv_unref, SvUPGRADE, sv_upgrade, sv_usepvn, sv_usepvn_mg, -sv_vcatpvfn(sv, pat, patlen, args, svargs, svmax, used_locale), -sv_vsetpvfn(sv, pat, patlen, args, svargs, svmax, used_locale), SvUV, -SvUVX, PL_sv_yes, THIS, toLOWER, toUPPER, warn, XPUSHi, XPUSHn, XPUSHp, -XPUSHs, XPUSHu, XS, XSRETURN, XSRETURN_EMPTY, XSRETURN_IV, XSRETURN_NO, -XSRETURN_NV, XSRETURN_PV, XSRETURN_UNDEF, XSRETURN_YES, XST_mIV, XST_mNV, -XST_mNO, XST_mPV, XST_mUNDEF, XST_mYES, XS_VERSION, XS_VERSION_BOOTCHECK, -Zero +sv_vcatpvfn, sv_vsetpvfn, SvUV, SvUVX, PL_sv_yes, THIS, toLOWER, toUPPER, +warn, XPUSHi, XPUSHn, XPUSHp, XPUSHs, XPUSHu, XS, XSRETURN, XSRETURN_EMPTY, +XSRETURN_IV, XSRETURN_NO, XSRETURN_NV, XSRETURN_PV, XSRETURN_UNDEF, +XSRETURN_YES, XST_mIV, XST_mNV, XST_mNO, XST_mPV, XST_mUNDEF, XST_mYES, +XS_VERSION, XS_VERSION_BOOTCHECK, Zero =item AUTHORS @@ -3132,6 +3382,46 @@ callback =item DATE +=head2 perlcompile - Introduction to the Perl Compiler-Translator + +=item DESCRIPTION + +=over + +=item Layout + +B::Bytecode, B::C, B::CC, B::Lint, B::Deparse, B::Xref + +=back + +=item Using The Back Ends + +=over + +=item The Cross Referencing Back End (B::Xref) + +i, &, s, r + +=item The Decompiling Back End + +=item The Lint Back End (B::Lint) + +=item The Simple C Back End + +=item The Bytecode Back End + +=item The Optimized C Back End + +B, O, B::Asmdata, B::Assembler, B::Bblock, B::Bytecode, B::C, B::CC, +B::Debug, B::Deparse, B::Disassembler, B::Lint, B::Showlex, B::Stackobj, +B::Stash, B::Terse, B::Xref + +=back + +=item KNOWN PROBLEMS + +=item AUTHOR + =head2 perlhist - the Perl history records =item DESCRIPTION @@ -3160,7 +3450,7 @@ callback =head1 PRAGMA DOCUMENTATION -=head2 attrs - set/get attributes of a subroutine +=head2 attrs - set/get attributes of a subroutine (deprecated) =item SYNOPSIS @@ -3174,7 +3464,35 @@ method, locked =item DESCRIPTION -=head2 attrs - set/get attributes of a subroutine +=head2 attributes - get/set subroutine or variable attributes + +=item SYNOPSIS + +=item DESCRIPTION + +=over + +=item Built-in Attributes + +locked, method + +=item Available Subroutines + +get, reftype + +=item Package-specific Attribute Handling + +FETCH_I_ATTRIBUTES, MODIFY_I_ATTRIBUTES + +=item Syntax of Attribute Lists + +=back + +=item EXAMPLES + +=item SEE ALSO + +=head2 attrs - set/get attributes of a subroutine (deprecated) =item SYNOPSIS @@ -3222,6 +3540,17 @@ method, locked encoding +=head2 charnames - define character names for C<\N{named}> string literal +escape. + +=item SYNOPSIS + +=item DESCRIPTION + +=item CUSTOM TRANSLATORS + +=item BUGS + =head2 constant - Perl pragma to declare constants =item SYNOPSIS @@ -3309,11 +3638,11 @@ double =over -=item ADDING DIRECTORIES TO @INC +=item Adding directories to @INC -=item DELETING DIRECTORIES FROM @INC +=item Deleting directories from @INC -=item RESTORING ORIGINAL @INC +=item Restoring original @INC =back @@ -3494,8 +3823,6 @@ C, C, C =item DESCRIPTION -C - =head1 MODULE DOCUMENTATION =head2 AnyDBM_File - provide framework for multiple DBMs @@ -3629,7 +3956,7 @@ FILL, MAX, KEYS, RITER, NAME, PMROOT, ARRAY =item B::OP METHODS -next, sibling, ppaddr, desc, targ, type, seq, flags, private +next, sibling, name, ppaddr, desc, targ, type, seq, flags, private =item B::UNOP METHOD @@ -3790,7 +4117,22 @@ B<-ffreetmps-each-bblock>, B<-ffreetmps-each-loop>, B<-fomit-taint>, B<-On> =item OPTIONS -B<-l>, B<-p>, B<-q>, B<-u>I, B<-s>I, B +B<-l>, B<-p>, B<-q>, B<-u>I, B<-s>I, B, BI, +B, BIB<.> + +=item USING B::Deparse AS A MODULE + +=over + +=item Synopsis + +=item Description + +=item new + +=item coderef2text + +=back =item BUGS @@ -3891,17 +4233,19 @@ C<-oFILENAME>, C<-r>, C<-D[tO]> =item Methods -new, debug +new, debug, iters =item Standard Exports timeit(COUNT, CODE), timethis ( COUNT, CODE, [ TITLE, [ STYLE ]] ), -timethese ( COUNT, CODEHASHREF, [ STYLE ] ), timediff ( T1, T2 ), timesum ( -T1, T2 ), timestr ( TIMEDIFF, [ STYLE, [ FORMAT ] ] ) +timethese ( COUNT, CODEHASHREF, [ STYLE ] ), timediff ( T1, T2 ), timestr ( +TIMEDIFF, [ STYLE, [ FORMAT ] ] ) =item Optional Exports -clearcache ( COUNT ), clearallcache ( ), disablecache ( ), enablecache ( ) +clearcache ( COUNT ), clearallcache ( ), cmpthese ( COUT, CODEHASHREF, [ +STYLE ] ), cmpthese ( RESULTSHASHREF ), countit(TIME, CODE), disablecache ( +), enablecache ( ), timesum ( T1, T2 ) =back @@ -4269,6 +4613,24 @@ B, B, B, B, B =item SEE ALSO +=head2 CGI::Pretty - module to produce nicely formatted HTML code + +=item SYNOPSIS + +=item DESCRIPTION + +=over + +=item Tags that won't be formatted + +=back + +=item BUGS + +=item AUTHOR + +=item SEE ALSO + =head2 CGI::Push - Simple Interface to Server Push =item SYNOPSIS @@ -4408,6 +4770,12 @@ module =item BUGS +=head2 Carp::Heavy - Carp guts + +=item SYNOPIS + +=item DESCRIPTION + =head2 Class::Struct - declare struct-like datatypes as Perl classes =item SYNOPSIS @@ -4460,7 +4828,8 @@ C, C, C, C, C, C =item b -C, C, C, C, C, C, C +C, C, C, C, C, C, +C, C =item c @@ -4473,65 +4842,64 @@ C, C =item d -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, -C, C, C, C, -C, C, C, C, -C, C, C, C, -C, C, C, C, C, -C, C, C, C, -C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, +C, C, C, C, +C, C, C, C, +C, C, C, C, +C, C, C, C, +C, C, C, C, +C, C, C, C, C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, -C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, C, C, C, C, -C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, +C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, +C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, @@ -4563,17 +4931,19 @@ C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, C, -C, C, C, C, -C, C, C, C, C, -C, C, C, C, -C, C, C +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, C, +C, C, C, C, +C, C, C, C, +C, C, C, C, +C, C, C, +C, C, C =item k @@ -4581,11 +4951,11 @@ C, C =item l -C, C, C, C, C, C, C, -C, C, C, C, C, C, -C, C, C, C, C, C, -C, C, C, C, C, C, -C +C, C, C, C, C, C, +C, C, C, C, C, C, +C, C, C, C, C, C, C, +C, C, C, C, C, C, +C, C =item m @@ -4613,8 +4983,8 @@ C, C, C C, C, C, C, C, C, C, C, C, C, C, C, -C, C, C, C, C, C, -C, C +C, C, C, C, C, C, +C, C, C =item r @@ -4627,12 +4997,15 @@ C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, C, C, -C, C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, -C, C, C, C +C, C, C, C, C, +C, C, C, C, C, C, +C, C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, C, +C, C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C =item t @@ -4641,17 +5014,20 @@ C, C, C, C =item u -C, C, C, C, C, C, +C, C, C, C, C, C, +C, C, C, C, C, C, C, C, C, -C, C, C, C, C, C +C, C, C, C, C, +C, C, C =item v +C, C, C, C, C, C, C =item x -C +C, C =item z @@ -4710,7 +5086,7 @@ B, B, B =over -=item Using DB_File with Berkeley DB version 2 +=item Using DB_File with Berkeley DB version 2 or 3 =item Interface to Berkeley DB @@ -4772,6 +5148,21 @@ $X-Eput($key, $value [, $flags]) ;>, B<$status = $X-Edel($key [, $flags]) ;>, B<$status = $X-Efd ;>, B<$status = $X-Eseq($key, $value, $flags) ;>, B<$status = $X-Esync([$flags]) ;> +=item DBM FILTERS + +B, B, B, +B + +=over + +=item The Filter + +=item An Example -- the NULL termination problem. + +=item Another Example -- Key is a C int. + +=back + =item HINTS AND TIPS =over @@ -4798,6 +5189,8 @@ $value, $flags) ;>, B<$status = $X-Esync([$flags]) ;> =back +=item REFERENCES + =item HISTORY =item BUGS @@ -4843,7 +5236,8 @@ $Data::Dumper::Freezer I $I->Freezer(I<[NEWVAL]>), $Data::Dumper::Toaster I $I->Toaster(I<[NEWVAL]>), $Data::Dumper::Deepcopy I $I->Deepcopy(I<[NEWVAL]>), $Data::Dumper::Quotekeys I $I->Quotekeys(I<[NEWVAL]>), -$Data::Dumper::Bless I $I->Bless(I<[NEWVAL]>) +$Data::Dumper::Bless I $I->Bless(I<[NEWVAL]>), +$Data::Dumper::Maxdepth I $I->Maxdepth(I<[NEWVAL]>) =item Exports @@ -4861,6 +5255,22 @@ Dumper =item SEE ALSO +=head2 Devel::DProf - a Perl code profiler + +=item SYNOPSIS + +=item DESCRIPTION + +=item PROFILE FORMAT + +=item AUTOLOAD + +=item ENVIRONMENT + +=item BUGS + +=item SEE ALSO + =head2 Devel::Peek - A data debugging tool for the XS programmer =item SYNOPSIS @@ -4913,7 +5323,7 @@ Dumper =head2 Dumpvalue - provides screen dump of Perl data. -=item SYNOPSYS +=item SYNOPSIS =item DESCRIPTION @@ -4980,6 +5390,8 @@ variables =over +=item How to Export + =item Selecting What To Export =item Specialised Import Lists @@ -4994,6 +5406,12 @@ variables =back +=head2 Exporter::Heavy - Exporter guts + +=item SYNOPIS + +=item DESCRIPTION + =head2 ExtUtils::Command - utilities to replace common UNIX commands in Makefiles etc. @@ -5123,14 +5541,14 @@ extliblist, file_name_is_absolute, find_perl =item Methods to actually produce chunks of text for the Makefile -fixin, force (o), guess_name, has_link_code, init_dirscan, init_main, -init_others, install (o), installbin (o), libscan (o), linkext (o), lsdir, -macro (o), makeaperl (o), makefile (o), manifypods (o), maybe_command, -maybe_command_in_dirs, needs_linking (o), nicetext, parse_version, -parse_abstract, pasthru (o), path, perl_script, perldepend (o), ppd, -perm_rw (o), perm_rwx (o), pm_to_blib, post_constants (o), post_initialize -(o), postamble (o), prefixify, processPL (o), realclean (o), -replace_manpage_separator, static (o), static_lib (o), staticmake (o), +fixin, force (o), guess_name, has_link_code, htmlifypods (o), init_dirscan, +init_main, init_others, install (o), installbin (o), libscan (o), linkext +(o), lsdir, macro (o), makeaperl (o), makefile (o), manifypods (o), +maybe_command, maybe_command_in_dirs, needs_linking (o), nicetext, +parse_version, parse_abstract, pasthru (o), path, perl_script, perldepend +(o), ppd, perm_rw (o), perm_rwx (o), pm_to_blib, post_constants (o), +post_initialize (o), postamble (o), prefixify, processPL (o), realclean +(o), replace_manpage_separator, static (o), static_lib (o), staticmake (o), subdir_x (o), subdirs (o), test (o), test_via_harness (o), test_via_script (o), tool_autosplit (o), tools_other (o), tool_xsubpp (o), top_targets (o), writedoc, xs_c (o), xs_cpp (o), xs_o (o), perl_archive, export_list @@ -5150,8 +5568,7 @@ ExtUtils::MakeMaker =item Methods always loaded -eliminate_macros, fixpath, catdir, catfile, wraplist, curdir (override), -rootdir (override), updir (override) +wraplist, rootdir (override) =item SelfLoaded methods @@ -5182,8 +5599,8 @@ ExtUtils::MakeMaker catfile, constants (o), static_lib (o), dynamic_bs (o), dynamic_lib (o), canonpath, perl_script, pm_to_blib, test_via_harness (o), tool_autosplit -(override), tools_other (o), xs_o (o), top_targets (o), manifypods (o), -dist_ci (o), dist_core (o), pasthru (o) +(override), tools_other (o), xs_o (o), top_targets (o), htmlifypods (o), +manifypods (o), dist_ci (o), dist_core (o), pasthru (o) =head2 ExtUtils::MakeMaker - create an extension Makefile @@ -5217,15 +5634,17 @@ dist_ci (o), dist_core (o), pasthru (o) AUTHOR, ABSTRACT, ABSTRACT_FROM, BINARY_LOCATION, C, CAPI, CCFLAGS, CONFIG, CONFIGURE, DEFINE, DIR, DISTNAME, DL_FUNCS, DL_VARS, EXCLUDE_EXT, -EXE_FILES, FIRST_MAKEFILE, FULLPERL, FUNCLIST, H, IMPORTS, INC, -INCLUDE_EXT, INSTALLARCHLIB, INSTALLBIN, INSTALLDIRS, INSTALLMAN1DIR, -INSTALLMAN3DIR, INSTALLPRIVLIB, INSTALLSCRIPT, INSTALLSITEARCH, -INSTALLSITELIB, INST_ARCHLIB, INST_BIN, INST_EXE, INST_LIB, INST_MAN1DIR, -INST_MAN3DIR, INST_SCRIPT, LDFROM, LIB, LIBPERL_A, LIBS, LINKTYPE, -MAKEAPERL, MAKEFILE, MAN1PODS, MAN3PODS, MAP_TARGET, MYEXTLIB, NAME, -NEEDS_LINKING, NOECHO, NORECURS, NO_VC, OBJECT, OPTIMIZE, PERL, PERLMAINCC, -PERL_ARCHLIB, PERL_LIB, PERL_SRC, PERM_RW, PERM_RWX, PL_FILES, PM, -PMLIBDIRS, POLLUTE, PPM_INSTALL_EXEC, PPM_INSTALL_SCRIPT, PREFIX, +EXE_FILES, FIRST_MAKEFILE, FULLPERL, FUNCLIST, H, HTMLLIBPODS, +HTMLSCRIPTPODS, IMPORTS, INC, INCLUDE_EXT, INSTALLARCHLIB, INSTALLBIN, +INSTALLDIRS, INSTALLHTMLPRIVLIBDIR, INSTALLHTMLSCRIPTDIR, +INSTALLHTMLSITELIBDIR, INSTALLMAN1DIR, INSTALLMAN3DIR, INSTALLPRIVLIB, +INSTALLSCRIPT, INSTALLSITEARCH, INSTALLSITELIB, INST_ARCHLIB, INST_BIN, +INST_EXE, INST_LIB, INST_HTMLLIBDIR, INST_HTMLSCRIPTDIR, INST_MAN1DIR, +INST_MAN3DIR, INST_SCRIPT, PERL_MALLOC_OK, LDFROM, LIB, LIBPERL_A, LIBS, +LINKTYPE, MAKEAPERL, MAKEFILE, MAN1PODS, MAN3PODS, MAP_TARGET, MYEXTLIB, +NAME, NEEDS_LINKING, NOECHO, NORECURS, NO_VC, OBJECT, OPTIMIZE, PERL, +PERLMAINCC, PERL_ARCHLIB, PERL_LIB, PERL_SRC, PERM_RW, PERM_RWX, PL_FILES, +PM, PMLIBDIRS, POLLUTE, PPM_INSTALL_EXEC, PPM_INSTALL_SCRIPT, PREFIX, PREREQ_PM, SKIP, TYPEMAPS, VERSION, VERSION_FROM, XS, XSOPT, XSPROTOARG, XS_VERSION @@ -5485,6 +5904,8 @@ catpath, abs2rel, rel2abs =item DESCRIPTION +eliminate_macros, fixpath + =over =item Methods always loaded @@ -5763,8 +6184,8 @@ new ( [ARGS] ) =item METHODS -accept([PKG]), timeout([VAL]), sockopt(OPT [, VAL]), sockdomain, socktype, -protocol, connected +accept([PKG]), socketpair(DOMAIN, TYPE, PROTOCOL), timeout([VAL]), +sockopt(OPT [, VAL]), sockdomain, socktype, protocol, connected =item SEE ALSO @@ -5961,8 +6382,8 @@ new ( [ARGS] ) =item METHODS -accept([PKG]), timeout([VAL]), sockopt(OPT [, VAL]), sockdomain, socktype, -protocol, connected +accept([PKG]), socketpair(DOMAIN, TYPE, PROTOCOL), timeout([VAL]), +sockopt(OPT [, VAL]), sockdomain, socktype, protocol, connected =item SEE ALSO @@ -6535,10 +6956,13 @@ Constants, Macros =item ARGUMENTS help, htmldir, htmlroot, infile, outfile, podroot, podpath, libpods, -netscape, nonetscape, index, noindex, recurse, norecurse, title, verbose +netscape, nonetscape, index, noindex, recurse, norecurse, title, css, +verbose, quiet =item EXAMPLE +=item ENVIRONMENT + =item AUTHOR =item BUGS @@ -6649,6 +7073,28 @@ B =item AUTHOR +=head2 Pod::Man - Convert POD data to formatted *roff input + +=item SYNOPSIS + +=item DESCRIPTION + +center, date, fixed, fixedbold, fixeditalic, fixedbolditalic, release, +section + +=item DIAGNOSTICS + +roff font should be 1 or 2 chars, not `%s', Invalid link %s, Unknown escape +EE%sE, Unknown sequence %s, Unmatched =back + +=item BUGS + +=item NOTES + +=item SEE ALSO + +=item AUTHOR + =head2 Pod::Parser - base class for creating POD filters and translators =item SYNOPSIS @@ -6661,6 +7107,10 @@ B =item QUICK OVERVIEW +=item PARSING OPTIONS + +B<-want_nonPODs> (default: unset), B<-process_cut_cmd> (default: unset) + =item RECOMMENDED SUBROUTINE/METHOD OVERRIDES =item B @@ -6699,7 +7149,8 @@ C<$text>, C<$line_num>, C<$pod_para> =item B -B<-expand_seq> =E I|I, B<-expand_ptree> =E +B<-expand_seq> =E I|I, B<-expand_text> =E +I|I, B<-expand_ptree> =E I|I =item B @@ -6712,8 +7163,12 @@ I|I =item ACCESSOR METHODS +=item B + =item B +=item B + =item B =item B @@ -6732,20 +7187,7 @@ I|I =item B<_pop_input_stream()> -=item SEE ALSO - -=item AUTHOR - -=head2 Pod::PlainText, pod2plaintext - function to convert POD data to -formatted ASCII text - -=item SYNOPSIS - -=item REQUIRES - -=item EXPORTS - -=item DESCRIPTION +=item TREE-BASED PARSING =item SEE ALSO @@ -6802,15 +7244,49 @@ B<-output>, B<-sections>, B<-ranges> =item AUTHOR -=head2 Pod::Text - convert POD data to formatted ASCII text +=head2 Pod::Text - Convert POD data to formatted ASCII text =item SYNOPSIS =item DESCRIPTION +alt, indent, loose, sentence, width + +=item DIAGNOSTICS + +Bizarre space in item, Can't open %s for reading: %s, Unknown escape: %s, +Unknown sequence: %s, Unmatched =back + +=item RESTRICTIONS + +=item NOTES + +=item SEE ALSO + =item AUTHOR -=item TODO +=head2 Pod::Text::Color - Convert POD data to formatted color ASCII text + +=item SYNOPSIS + +=item DESCRIPTION + +=item BUGS + +=item SEE ALSO + +=item AUTHOR + +=head2 Pod::Text::Termcap, Pod::Text::Color - Convert POD data to ASCII +text with format escapes + +=item SYNOPSIS + +=item DESCRIPTION + +=item SEE ALSO + +=item AUTHOR =head2 Pod::Usage, pod2usage() - print a usage message from embedded pod documentation diff --git a/pp.c b/pp.c index 6b45946..41aeeeb 100644 --- a/pp.c +++ b/pp.c @@ -5198,7 +5198,7 @@ PP(pp_lock) DEBUG_S(PerlIO_printf(Perl_debug_log, "0x%lx: pp_lock lock 0x%lx\n", (unsigned long)thr, (unsigned long)sv);) MUTEX_UNLOCK(MgMUTEXP(mg)); - SAVEDESTRUCTOR(Perl_unlock_condpair, sv); + SAVEDESTRUCTOR_X(Perl_unlock_condpair, sv); } #endif /* USE_THREADS */ if (SvTYPE(retsv) == SVt_PVAV || SvTYPE(retsv) == SVt_PVHV diff --git a/pp_hot.c b/pp_hot.c index 78a454c..344b808 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -2299,7 +2299,7 @@ try_autoload: DEBUG_S(PerlIO_printf(Perl_debug_log, "%p: pp_entersub lock %p\n", thr, sv);) MUTEX_UNLOCK(MgMUTEXP(mg)); - SAVEDESTRUCTOR(Perl_unlock_condpair, sv); + SAVEDESTRUCTOR_X(Perl_unlock_condpair, sv); } MUTEX_LOCK(CvMUTEXP(cv)); } @@ -2344,7 +2344,7 @@ try_autoload: CvOWNER(cv) = thr; SvREFCNT_inc(cv); if (CvDEPTH(cv) == 0) - SAVEDESTRUCTOR(unset_cvowner, (void*) cv); + SAVEDESTRUCTOR_X(unset_cvowner, (void*) cv); } else { /* (2) => grab ownership of cv. (3) => make clone */ @@ -2382,7 +2382,7 @@ try_autoload: DEBUG_S(if (CvDEPTH(cv) != 0) PerlIO_printf(Perl_debug_log, "depth %ld != 0\n", CvDEPTH(cv));); - SAVEDESTRUCTOR(unset_cvowner, (void*) cv); + SAVEDESTRUCTOR_X(unset_cvowner, (void*) cv); } } #endif /* USE_THREADS */ diff --git a/proto.h b/proto.h index 2f68d9b..6551c31 100644 --- a/proto.h +++ b/proto.h @@ -510,7 +510,8 @@ VIRTUAL void Perl_save_aptr(pTHX_ AV** aptr); VIRTUAL AV* Perl_save_ary(pTHX_ GV* gv); VIRTUAL void Perl_save_clearsv(pTHX_ SV** svp); VIRTUAL void Perl_save_delete(pTHX_ HV* hv, char* key, I32 klen); -VIRTUAL void Perl_save_destructor(pTHX_ DESTRUCTORFUNC_t f, void* p); +VIRTUAL void Perl_save_destructor(pTHX_ DESTRUCTORFUNC_NOCONTEXT_t f, void* p); +VIRTUAL void Perl_save_destructor_x(pTHX_ DESTRUCTORFUNC_t f, void* p); VIRTUAL void Perl_save_freesv(pTHX_ SV* sv); VIRTUAL void Perl_save_freeop(pTHX_ OP* o); VIRTUAL void Perl_save_freepv(pTHX_ char* pv); diff --git a/regcomp.h b/regcomp.h index e30c8e7..d6ee2f1 100644 --- a/regcomp.h +++ b/regcomp.h @@ -247,14 +247,14 @@ struct regnode_2 { #define FAIL(m) \ STMT_START { \ if (!SIZE_ONLY) \ - SAVEDESTRUCTOR(clear_re,(void*)PL_regcomp_rx); \ + SAVEDESTRUCTOR_X(clear_re,(void*)PL_regcomp_rx); \ Perl_croak(aTHX_ "/%.127s/: %s", PL_regprecomp,m); \ } STMT_END #define FAIL2(pat,m) \ STMT_START { \ if (!SIZE_ONLY) \ - SAVEDESTRUCTOR(clear_re,(void*)PL_regcomp_rx); \ + SAVEDESTRUCTOR_X(clear_re,(void*)PL_regcomp_rx); \ S_re_croak2(aTHX_ "/%.127s/: ",pat,PL_regprecomp,m); \ } STMT_END diff --git a/regexec.c b/regexec.c index ed74369..65a3b90 100644 --- a/regexec.c +++ b/regexec.c @@ -1509,7 +1509,7 @@ S_regtry(pTHX_ regexp *prog, char *startpos) } PL_reg_magic = mg; PL_reg_oldpos = mg->mg_len; - SAVEDESTRUCTOR(restore_pos, 0); + SAVEDESTRUCTOR_X(restore_pos, 0); } if (!PL_reg_curpm) New(22,PL_reg_curpm, 1, PMOP); diff --git a/scope.c b/scope.c index 8952f43..9ee0429 100644 --- a/scope.c +++ b/scope.c @@ -541,7 +541,7 @@ Perl_save_list(pTHX_ register SV **sarg, I32 maxsarg) } void -Perl_save_destructor(pTHX_ DESTRUCTORFUNC_t f, void* p) +Perl_save_destructor(pTHX_ DESTRUCTORFUNC_NOCONTEXT_t f, void* p) { dTHR; SSCHECK(3); @@ -551,6 +551,16 @@ Perl_save_destructor(pTHX_ DESTRUCTORFUNC_t f, void* p) } void +Perl_save_destructor_x(pTHX_ DESTRUCTORFUNC_t f, void* p) +{ + dTHR; + SSCHECK(3); + SSPUSHDXPTR(f); + SSPUSHPTR(p); + SSPUSHINT(SAVEt_DESTRUCTOR_X); +} + +void Perl_save_aelem(pTHX_ AV *av, I32 idx, SV **sptr) { dTHR; @@ -831,7 +841,11 @@ Perl_leave_scope(pTHX_ I32 base) break; case SAVEt_DESTRUCTOR: ptr = SSPOPPTR; - CALLDESTRUCTOR(aTHXo_ ptr); + (*SSPOPDPTR)(ptr); + break; + case SAVEt_DESTRUCTOR_X: + ptr = SSPOPPTR; + (*SSPOPDXPTR)(aTHXo_ ptr); break; case SAVEt_REGCONTEXT: case SAVEt_ALLOC: diff --git a/scope.h b/scope.h index c975cd1..f481306 100644 --- a/scope.h +++ b/scope.h @@ -28,6 +28,7 @@ #define SAVEt_HINTS 27 #define SAVEt_ALLOC 28 #define SAVEt_GENERIC_SVREF 29 +#define SAVEt_DESTRUCTOR_X 30 #define SSCHECK(need) if (PL_savestack_ix + need > PL_savestack_max) savestack_grow() #define SSPUSHINT(i) (PL_savestack[PL_savestack_ix++].any_i32 = (I32)(i)) @@ -35,11 +36,13 @@ #define SSPUSHIV(i) (PL_savestack[PL_savestack_ix++].any_iv = (IV)(i)) #define SSPUSHPTR(p) (PL_savestack[PL_savestack_ix++].any_ptr = (void*)(p)) #define SSPUSHDPTR(p) (PL_savestack[PL_savestack_ix++].any_dptr = (p)) +#define SSPUSHDXPTR(p) (PL_savestack[PL_savestack_ix++].any_dxptr = (p)) #define SSPOPINT (PL_savestack[--PL_savestack_ix].any_i32) #define SSPOPLONG (PL_savestack[--PL_savestack_ix].any_long) #define SSPOPIV (PL_savestack[--PL_savestack_ix].any_iv) #define SSPOPPTR (PL_savestack[--PL_savestack_ix].any_ptr) #define SSPOPDPTR (PL_savestack[--PL_savestack_ix].any_dptr) +#define SSPOPDXPTR (PL_savestack[--PL_savestack_ix].any_dxptr) #define SAVETMPS save_int((int*)&PL_tmps_floor), PL_tmps_floor = PL_tmps_ix #define FREETMPS if (PL_tmps_ix > PL_tmps_floor) free_tmps() @@ -81,9 +84,11 @@ #define SAVEGENERICSV(s) save_generic_svref((SV**)&(s)) #define SAVEDELETE(h,k,l) \ save_delete(SOFT_CAST(HV*)(h), SOFT_CAST(char*)(k), (I32)(l)) -#define CALLDESTRUCTOR (*SSPOPDPTR) #define SAVEDESTRUCTOR(f,p) \ - save_destructor((DESTRUCTORFUNC_t)(f), SOFT_CAST(void*)(p)) + save_destructor((DESTRUCTORFUNC_NOCONTEXT_t)(f), SOFT_CAST(void*)(p)) + +#define SAVEDESTRUCTOR_X(f,p) \ + save_destructor_x((DESTRUCTORFUNC_t)(f), SOFT_CAST(void*)(p)) #define SAVESTACK_POS() \ STMT_START { \ diff --git a/toke.c b/toke.c index 58b82df..4cab2a2 100644 --- a/toke.c +++ b/toke.c @@ -375,13 +375,13 @@ Perl_lex_start(pTHX_ SV *line) SAVESPTR(PL_linestr); SAVEPPTR(PL_lex_brackstack); SAVEPPTR(PL_lex_casestack); - SAVEDESTRUCTOR(restore_rsfp, PL_rsfp); + SAVEDESTRUCTOR_X(restore_rsfp, PL_rsfp); SAVESPTR(PL_lex_stuff); SAVEI32(PL_lex_defer); SAVEI32(PL_sublex_info.sub_inwhat); SAVESPTR(PL_lex_repl); - SAVEDESTRUCTOR(restore_expect, PL_tokenbuf + PL_expect); /* encode as pointer */ - SAVEDESTRUCTOR(restore_lex_expect, PL_tokenbuf + PL_expect); + SAVEDESTRUCTOR_X(restore_expect, PL_tokenbuf + PL_expect); /* encode as pointer */ + SAVEDESTRUCTOR_X(restore_lex_expect, PL_tokenbuf + PL_expect); PL_lex_state = LEX_NORMAL; PL_lex_defer = 0; diff --git a/vms/perly_c.vms b/vms/perly_c.vms index 08fa561..8014792 100644 --- a/vms/perly_c.vms +++ b/vms/perly_c.vms @@ -30,7 +30,22 @@ struct ysv { YYSTYPE oldyylval; }; -static void yydestruct(pTHXo_ void *ptr); +static void yydestruct(void *ptr); + +static void +yydestruct(void *ptr) +{ + struct ysv* ysave = (struct ysv*)ptr; + if (ysave->yyss) Safefree(ysave->yyss); + if (ysave->yyvs) Safefree(ysave->yyvs); + yydebug = ysave->oldyydebug; + yynerrs = ysave->oldyynerrs; + yyerrflag = ysave->oldyyerrflag; + yychar = ysave->oldyychar; + yyval = ysave->oldyyval; + yylval = ysave->oldyylval; + Safefree(ysave); +} #line 49 "perly.y" #if 0 /* get this from perly.h instead */ @@ -2481,23 +2496,3 @@ yyabort: yyaccept: return retval; } - -#ifdef PERL_OBJECT -#define NO_XSLOCKS -#include "XSUB.h" -#endif - -static void -yydestruct(pTHXo_ void *ptr) -{ - struct ysv* ysave = (struct ysv*)ptr; - if (ysave->yyss) Safefree(ysave->yyss); - if (ysave->yyvs) Safefree(ysave->yyvs); - yydebug = ysave->oldyydebug; - yynerrs = ysave->oldyynerrs; - yyerrflag = ysave->oldyyerrflag; - yychar = ysave->oldyychar; - yyval = ysave->oldyyval; - yylval = ysave->oldyylval; - Safefree(ysave); -}