summaryrefslogtreecommitdiff
path: root/pad.h
Commit message (Collapse)AuthorAgeFilesLines
* Store the PL_compcv instead of the the PL_comppad in parser stack, and make ↵Gerard Goossen2009-12-161-1/+2
| | | | it reference counted. Properly solves [perl #66094]
* Make the style of pad_add_name's flags consistent with pad_new's and pad_tidy's.Nicholas Clark2009-11-151-3/+3
|
* Convert pad_check_dup() to static linkage, and call it from Perl_pad_add_name().Nicholas Clark2009-11-151-2/+2
| | | | | Provide a flag option to Perl_pad_add_name(), pad_add_NO_DUP_CHECK, to supress the call.
* Refactor common code paths from Perl_pad_add_name() into S_pad_add_name_sv().Nicholas Clark2009-11-151-1/+0
| | | | | | The only user of the pad_add_FAKE flag was S_pad_findlex(), so move the relevant code there from Perl_pad_add_name(), and have S_pad_findlex() call S_pad_add_name_sv() directly. This eliminates the pad_add_FAKE flag completely.
* Add length and flags arguments to Perl_pad_check_dup().Nicholas Clark2009-11-091-0/+11
| | | | | | Currently only pad_add_OUR is used. The length is cross-checked against strlen() on the pointer, but the intent is to re-work the entire pad API to be UTF-8 aware, from the current situation of char * pointers only.
* Use of freed comppad array during clear_yystack()Marcus Holland-Moritz2009-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Message-ID: <20081026231720.34258457@r2d2> Patch description from the original email : I tried to make tests pass on a perl built with -DPERL_POISON, as some tests were dying with segfaults. They all originated from the same source: clear_yystack() after a compile error. [...] As far as I can see, after croaking the newly created CV is destroyed and its pad is undef'd. [...] This will SvREFCNT_dec PL_comppad and set PL_comppad to NULL. However, later, in clear_yystack(), when the ops are freed, the old PL_comppad is restored by PAD_RESTORE_LOCAL, as a reference is still in ps->comppad. But now the pad AV is already dead. Normally (i.e. without PERL_POISON), the dead AV will have AvARRAY(av) set to NULL by av_undef(). So PAD_RESTORE_LOCAL will actually set PL_curpad to NULL, and thus pad_free() will not attempt to do anything. But with PERL_POISON, the storage for AvARRAY(av) (i.e. sv_u) will be reused for chaining the free SV heads in the arena (as opposed to SvANY(sv) in case of !PERL_POISON). This means that PAD_RESTORE_LOCAL will find AvARRAY(av) non-NULL and will set PL_curpad to that value, finally causing the segfault in pad_free(). While I think I understand what's going on, I don't have the slightest clue how to properly fix this. Given that it's not a problem only under PERL_POISON, but always (as dead SV heads are being used), I think it should ultimately be fixed. The only thing I can offer right now is a patch to make it work with PERL_POISON as good (or as bad) as without by making PAD_RESTORE_LOCAL explicitly check if the pad passed in is already dead and refusing to use it if it is.
* Add MUTABLE_AV(), and remove (AV *) casts from headers.Nicholas Clark2008-10-271-3/+3
| | | p4raw-id: //depot/perl@34608
* Add a macro MUTABLE_PTR(p), which on (non-pedantic) gcc will not castNicholas Clark2008-10-271-8/+8
| | | | | | | | | | away const, returning a void *. Add MUTABLE_SV(sv) which uses this, and replace all (SV *) casts either with MUTABLE_SV(sv), or (const SV *). This probably still needs some work - assigning to SvPVX() and SvRV() is now likely to generate a casting error. The core doesn't do this. But as-is it's finding bugs that can be fixed. p4raw-id: //depot/perl@34605
* Update copyright years.Nicholas Clark2008-10-251-1/+1
| | | p4raw-id: //depot/perl@34585
* Re: [PATCH] readable assertion names, now the restReini Urban2008-06-081-35/+39
| | | | | | From: "Reini Urban" <rurban@x-ray.at> Message-ID: <6910a60806080717h1aaaef1fh425a2ef21a62c9ed@mail.gmail.com> p4raw-id: //depot/perl@34030
* A couple of POD fixes by Steven SchubigerRafael Garcia-Suarez2008-01-161-2/+1
| | | p4raw-id: //depot/perl@32982
* Add editor blocks to some header files.Marcus Holland-Moritz2008-01-011-0/+10
| | | p4raw-id: //depot/perl@32793
* Update copyright years in .h files. Also, in .plRafael Garcia-Suarez2007-01-051-1/+1
| | | | | | files that generate .h files, so they'll be ready next time. p4raw-id: //depot/perl@29695
* Rename OURSTASH to SvOURSTASH and OURSTASH_set to SvOURSTASH_set.Nicholas Clark2007-01-031-1/+1
| | | p4raw-id: //depot/perl@29679
* With PAD_COMPNAME_GEN in SvUVX, SvCUR is trustworthy once more.Nicholas Clark2006-12-281-3/+4
| | | p4raw-id: //depot/perl@29633
* Move PAD_COMPNAME_GEN from SvCUR to SvUVX.Nicholas Clark2006-12-281-4/+4
| | | p4raw-id: //depot/perl@29632
* Move PAD_FAKELEX_ANON and PAD_FAKELEX_MULTI to pad.h, export them viaNicholas Clark2006-12-281-0/+5
| | | | | B.pm, so that B::Concise doesn't need to hard code magic numbers. p4raw-id: //depot/perl@29631
* Move the low/high cop sequences from NVX/IVX to a two U32 structureNicholas Clark2006-12-281-4/+53
| | | | | | in the xnv union. This frees up IVX for the PL_generation code, which in turn will allow SvCUR to return to its real purpose. p4raw-id: //depot/perl@29630
* Abstract the pad code's overloaded use of SvNVX and SvIVX intoNicholas Clark2006-12-281-1/+9
| | | | | | 4 macros COP_SEQ_RANGE_LOW, COP_SEQ_RANGE_HIGH, PARENT_PAD_INDEX and PARENT_FAKELEX_FLAGS p4raw-id: //depot/perl@29629
* es: quiet some warnings (with a free AIX cpp insanity avoidance tip)Jarkko Hietaniemi2006-04-101-5/+5
| | | | | | Message-ID: <44375F23.6030900@gmail.com> Date: Sat, 08 Apr 2006 09:58:43 +0300 p4raw-id: //depot/perl@27754
* Add MAD changes to pad code (new function Perl_pad_peg)Nicholas Clark2006-03-081-0/+6
| | | p4raw-id: //depot/perl@27419
* Replace usage of GvSTASH for storing the stash of C<our> withNicholas Clark2006-02-241-1/+1
| | | | | OURSTASH. Set the stash with OURSTASH_SET. p4raw-id: //depot/perl@27306
* As SVs can't both be in a pad, and the name of a variable in the pad,Nicholas Clark2006-02-241-1/+2
| | | | | overlay SVs_PADTMP with SVpad_TYPED and SVs_PADMY with SVpad_OUR. p4raw-id: //depot/perl@27297
* Replace direct flags tests & manipulations for SVpad_TYPED andNicholas Clark2006-02-231-0/+1
| | | | | | SVpad_OUR with macros SvPAD_TYPED(), SvPAD_OUR() etc, to abstract away the flags bits acutally used to store this information. p4raw-id: //depot/perl@27294
* More NullXXX macro removal from Andy LesterRafael Garcia-Suarez2006-02-201-4/+4
| | | p4raw-id: //depot/perl@27238
* Re: [PATCH] s/Null(gv|hv|sv)/NULL/gSteven Schubiger2006-02-031-1/+1
| | | | | | Message-ID: <20060203152449.GI12591@accognoscere.homeunix.org> Date: Fri, 3 Feb 2006 16:24:49 +0100 p4raw-id: //depot/perl@27065
* Update copyright with the 2 years where changes were made.Nicholas Clark2006-01-081-1/+1
| | | p4raw-id: //depot/perl@26737
* Sync change 25229 to .h source filesRafael Garcia-Suarez2005-07-281-1/+1
| | | p4raw-id: //depot/perl@25233
* the PAD_SET_CUR macro expanded too much for AIX compilersDave Mitchell2005-07-011-1/+6
| | | p4raw-id: //depot/perl@25042
* pad_compname_type(), takes care of a clunky macroAndy Lester2005-04-191-4/+1
| | | | | Message-Id: <20050419163844.GA19747@petdance.com> p4raw-id: //depot/perl@24256
* Refactoring to Sv*_set() macros - patch #5Steve Peters2005-04-191-1/+6
| | | | | | Message-ID: <20050419000925.GA21640@mccoy.peters.homeunix.org> Date: Mon, 18 Apr 2005 19:09:25 -0500 p4raw-id: //depot/perl@24248
* Casting to/from (void *) sufficient to make a C++ compiler happy.Nicholas Clark2005-04-061-1/+1
| | | p4raw-id: //depot/perl@24175
* Ensure PL_comppad/curpad point to PL_main_cv's padlist whenDave Mitchell2003-10-161-2/+9
| | | | | | PL_main_root is freed; this may not have been be the case if a thread other than the main one is the last to be destroyed p4raw-id: //depot/perl@21470
* Fix up Larry's copyright statements to my best knowledge.Jarkko Hietaniemi2003-04-161-1/+1
| | | | | | | (Lots of Perl 5 source code archaeology was involved.) Larry didn't make strangled noises when I showed him the patch, either :-) p4raw-id: //depot/perl@19242
* Reverse copyright update (#18801) for files not changed in 2003.Hugo van der Sanden2003-03-021-1/+1
| | | p4raw-id: //depot/perl@18807
* Update all copyrights to 2003, from JarkkoHugo van der Sanden2003-03-021-1/+1
| | | p4raw-id: //depot/perl@18801
* Re: [jhi@iki.fi: enums are not nums]Dave Mitchell2002-12-171-5/+3
| | | | | Message-ID: <20021214191649.B3992@fdgroup.com> p4raw-id: //depot/perl@18311
* Re: threads and Win2000 (Smoke 18064 FAIL(F) MSWin32 5.0 W2000Pro)Dave Mitchell2002-11-121-7/+9
| | | | | Message-ID: <20021107163802.C25337@fdgroup.com> p4raw-id: //depot/perl@18142
* PL_curpad == AvARRAY(PL_comppad) alwaysDave Mitchell2002-10-221-19/+67
| | | | | Message-ID: <20021018133640.A19172@fdgroup.com> p4raw-id: //depot/perl@18048
* Non ANSI feature detection in enumH.Merijn Brand2002-10-041-1/+1
| | | p4raw-id: //depot/perl@17975
* move all pad-related code to its own src fileDave Mitchell2002-10-021-0/+214
Message-ID: <20020925234023.A20044@fdgroup.com> p4raw-id: //depot/perl@17953