summaryrefslogtreecommitdiff
path: root/gv.c
Commit message (Collapse)AuthorAgeFilesLines
* Extend newSVpvn_flags() to also call sv_2mortal() if SVs_TEMP is set inNicholas Clark2008-01-031-2/+2
| | | | | | the flags. Move its implementation just ahead of sv_2mortal()'s for CPU cache locality. Refactor all code that can be to use this. p4raw-id: //depot/perl@32818
* Eliminating the duplicate logic in S_method_common() andNicholas Clark2007-11-241-0/+11
| | | | | | | | | Perl_gv_fetchmethod_autoload() is clearly TODO. Move the paragraph "strcat(), strcpy(), strncat(), strncpy(), sprintf(), vsprintf()" to the section "Tasks that need a little C knowledge" as it doesn't need any XS knowledge. p4raw-id: //depot/perl@32478
* SQL::Translator triggered a subtle piece of wrongness, whereby itNicholas Clark2007-10-221-2/+10
| | | | | | | | | managed to cause a proxy constant subroutine in the symbol table to be upgraded to a GV at precisely the point where it was being considered as a possible IO handle name. The core's user-space visible behaviour certainly was buggy - I believe this patch to be the correct fix. However, it seems to be very hard to write a test for it. p4raw-id: //depot/perl@32172
* Change 32136 introduced an error - passing a const char * toNicholas Clark2007-10-181-1/+1
| | | | | sv_usepvn_flags(). Fixed. p4raw-id: //depot/perl@32139
* Eliminate some uses of sv_setpv() where we already know the length.Nicholas Clark2007-10-181-2/+3
| | | | | | Donate the prototype buffer to the CV in Perl_gv_init(), rather than setting a copy, and immediately free()ing the original. p4raw-id: //depot/perl@32136
* In Perl_amagic_call(), construct the SV with newSVpvn(), as we now knowNicholas Clark2007-10-181-1/+2
| | | | | the length. (Not sure why I didn't spot this one during change 32124.) p4raw-id: //depot/perl@32132
* No need to call strlen() on the result of CopSTASHPV() when unthreaded,Nicholas Clark2007-10-181-0/+5
| | | | | | | as the length is already known. Hence conditionally compile out the logic related to the call to strlen() from S_method_common(), and use newSVhek in S_gv_get_super_pkg(). p4raw-id: //depot/perl@32130
* Don't call strlen() on CopFILE() for the unthreaded case, because theNicholas Clark2007-10-181-2/+16
| | | | | length can be obtained via CopFILESV(). p4raw-id: //depot/perl@32129
* Where possible, change gv_fetchfile() to gv_fetchfile_flags(),Nicholas Clark2007-10-181-1/+2
| | | | | | | | | | | gv_stashpv() to gv_stashpvn() and gv_fetchpv() to gv_fetchpvn_flags(). Change the len parameter of S_find_in_my_stash() from I32 to STRLEN, as a pointer the variable needs to be passed onwards, and size matters on 64 bit platforms. Fix the temporary scribbling of a buffer in Perl_yylex() by using gv_fetchpvn_flags(), and remove the XXX comment added in change 27641. Brought to you by the Campaign for the Elimination of strlen(). p4raw-id: //depot/perl@32127
* Storing the length of all the overloading names saves a strlen() in aNicholas Clark2007-10-171-1/+1
| | | | | | loop in Perl_Gv_AMupdate(). Brought to you by the Campaign for the Elimination of strlen(). p4raw-id: //depot/perl@32124
* PL_AMG_names is only used by gv.c (as far as Google code search canNicholas Clark2007-10-161-0/+1
| | | | | | | see), so it can easily be a static variable inside gv.c. This allows the implementation to be changed in future Perls within the 5.10.x series. p4raw-id: //depot/perl@32116
* Re: [perl #46217] (resent) Typeglobs vs. SUPER:: (Hook::LexWrap failure)Brandon Black2007-10-081-2/+28
| | | | | | From: "Brandon Black" <blblack@gmail.com> Message-ID: <84621a60710072036l60c29016tba8a32b8021b5b24@mail.gmail.com> p4raw-id: //depot/perl@32065
* Silence a load of "value computed is not used" warningsRafael Garcia-Suarez2007-09-211-1/+1
| | | p4raw-id: //depot/perl@31936
* Turn the "$# / $* is no longer supported" warnings intoRafael Garcia-Suarez2007-07-111-1/+1
| | | | | severe warnings (as suggested by Audrey Tang) p4raw-id: //depot/perl@31589
* First patch from:Brandon Black2007-06-261-2/+5
| | | | | | | | | | Subject: Re: [perl #43357] *DESTROY = sub {} at runtime From: "Brandon Black" <blblack@gmail.com> Message-ID: <84621a60706260905x2da6eaf1x4bd7d5223951e52@mail.gmail.com> Fix problem recently introduced with loosing a DESTROY when redefined at runtime. p4raw-id: //depot/perl@31472
* Re: [PATCH] Callbacks for named captures (%+ and %-)Ævar Arnfjörð Bjarmason2007-06-061-2/+2
| | | | | | From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com> Message-ID: <51dd1af80706031324y5618d519p460da27a2e7fe712@mail.gmail.com> p4raw-id: //depot/perl@31341
* FETCH/STORE/LENGTH callbacks for numbered capture variablesÆvar Arnfjörð Bjarmason2007-05-031-11/+11
| | | | | | From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com> Message-ID: <51dd1af80705011658g1156e14cw4d2b21a8d772ed41@mail.gmail.com> p4raw-id: //depot/perl@31130
* Re: mro status, etcBrandon Black2007-04-301-27/+4
| | | | | | From: "Brandon Black" <blblack@gmail.com> Message-ID: <84621a60704291527y1b39be37l221ef66e4c828f66@mail.gmail.com> p4raw-id: //depot/perl@31107
* Put the "Can't locate package..." warnings in the "syntax"Rafael Garcia-Suarez2007-04-191-2/+2
| | | | | category, as documented p4raw-id: //depot/perl@30982
* Re: new C3 MRO patchBrandon Black2007-04-191-111/+139
| | | | | | From: "Brandon Black" <blblack@gmail.com> Message-ID: <84621a60704171114k29b0460el5b08ce5185d55ed5@mail.gmail.com> p4raw-id: //depot/perl@30980
* Remove the "performance hack" that suppressed used only once warningsNicholas Clark2007-04-161-13/+0
| | | | | for files in the standard library. p4raw-id: //depot/perl@30969
* Work round what appears to be a bug in Sun C++ 5.8 2005/10/13Nicholas Clark2007-04-111-1/+5
| | | | | | If we just cast GvSVn(gv) to void, it ignores evaluating it for its side effect. p4raw-id: //depot/perl@30903
* Upgrade to version.pm 0.71, by John PeacockRafael Garcia-Suarez2007-03-191-1/+1
| | | p4raw-id: //depot/perl@30629
* use a fresh stack when loading Errno.pm etc.Dave Mitchell2007-03-141-1/+2
| | | | | | Stops 'use vars qw($!)' in lib/vars.t segfaulting. (This can be reduced to 'my $sym = "!"; *$sym = \$$sym') p4raw-id: //depot/perl@30577
* Re: [PATCH] Tweaks so that miniperl.exe doesnt croak while building perl.exeYves Orton2007-03-081-24/+9
| | | | | Message-ID: <9b18b3110703080120s41147a4fh4f4c1f9817079be3@mail.gmail.com> p4raw-id: //depot/perl@30518
* Re: [PATCH] Tweaks so that miniperl.exe doesnt croak while building perl.exeYves Orton2007-03-081-10/+11
| | | | | Message-ID: <9b18b3110703071144t787e028s8a79fa1986624b54@mail.gmail.com> p4raw-id: //depot/perl@30517
* Use another method to avoid the "possible interpolation" warningRafael Garcia-Suarez2007-03-071-1/+4
| | | | | | | | | for @- and @+ : do this directly from the lexer (patch by Yves Orton.) This way, @- and @+ aren't preloaded anymore. Avoid to require re::Tie::Hash::NamedCapture when the *- or *+ globs are created, this was breaking the build due to miniperl's inability to load it. p4raw-id: //depot/perl@30496
* Avoid to load the *+ and *- globs too early.Rafael Garcia-Suarez2007-03-071-8/+5
| | | | | | | | | | To silence spurious interpolation warnings, merely create the stash entry for them. Ensure that the re::Tie::Hash::NamedCapture module is always loaded when we have created the tied hashes %+ and %-. Revert change #30483, which is now unnecessary. p4raw-link: @30483 on //depot/perl: 73f68b39467596f862aade4f4b46d6061aa98bd3 p4raw-id: //depot/perl@30490
* Fix error messages returned by S_require_tie_mod. Fix small leaksRafael Garcia-Suarez2007-03-061-19/+21
| | | | | | happening in there too. More importantly, call it when we load both a hash or a glob. p4raw-id: //depot/perl@30488
* Fix a small leak on loading *+ and *- globsRafael Garcia-Suarez2007-03-061-0/+2
| | | p4raw-id: //depot/perl@30487
* More assertion failures, found by auditing the code.Nicholas Clark2007-03-021-1/+1
| | | p4raw-id: //depot/perl@30443
* Don't crash if the symbol table entry for ISA isn't a typeglob.Nicholas Clark2007-03-021-1/+1
| | | p4raw-id: //depot/perl@30442
* Re: [perl #41546] perl 5.8.x bug: overloaded 'eq' does not work with 'nomethod'Rick Delaney2007-02-231-0/+13
| | | | | Message-ID: <20070221215316.GF5646@bort.ca> p4raw-id: //depot/perl@30383
* Add a new API function newSV_type, to replace the idiom:Nicholas Clark2007-02-181-3/+1
| | | | | | sv = newSV(0); sv_upgrade(sv, type); p4raw-id: //depot/perl@30347
* Fix Pod errors.Nicholas Clark2007-02-091-1/+1
| | | p4raw-id: //depot/perl@30188
* Purge all references to 5005 threads variables in the code.Nicholas Clark2007-02-031-1/+0
| | | | | (Retain the aides memoire in makedef.pl) p4raw-id: //depot/perl@30105
* Stop S_incline needing to temporarily write a '\0' into its passed-inNicholas Clark2007-01-261-8/+16
| | | | | | buffer. (Requires adding gv_fetchfile_flags(), savesharedpvn() and CopFILE_setn() to provide pointer/length versions of APIs) p4raw-id: //depot/perl@30015
* As we're not passing over (or copying in) a NUL, don't need that extraNicholas Clark2007-01-261-10/+10
| | | | | | byte for it, so correct the < to <= so that we use the smallbuf whenever possible. p4raw-id: //depot/perl@30000
* Convert the last remaining 256 byte "small"bufs to 128 bytes.Nicholas Clark2007-01-251-1/+1
| | | | | | | (The actual size doesn't matter, as the buffers are only there to save a malloc() for the common, short, case. Coverage reports suggest that we aren't actually testing the long case. Yet - will fix this) p4raw-id: //depot/perl@29987
* Neither gv_fetchpvn_flags() nor hv_fetch() need a NUL terminatedNicholas Clark2007-01-251-6/+4
| | | | | string, so don't bother allocating buffer space or adding a NUL. p4raw-id: //depot/perl@29983
* The last parameter to gv_stashpv/gv_stashpvn/gv_stashsv is a bitmaskNicholas Clark2007-01-251-32/+31
| | | | | of flags, not a boolean, so correct the documenation and callers. p4raw-id: //depot/perl@29977
* Change 28058 hadn't been tested with -DPERL_CREATE_GVSVNicholas Clark2007-01-251-1/+1
| | | p4raw-id: //depot/perl@29970
* Add missing SVfARG()s in require_tie_mod().Marcus Holland-Moritz2007-01-181-2/+2
| | | p4raw-id: //depot/perl@29875
* Add support for /k modfier for matching along with ${^PREMATCH}, ${^MATCH}, ↵Yves Orton2007-01-151-0/+6
| | | | | | | | ${^POSTMATCH} Message-ID: <9b18b3110701111731x29b1c63i57b1698f769b3bbc@mail.gmail.com> (with tweaks) p4raw-id: //depot/perl@29831
* Add get_cvn_flags(), which is like get_cv() but takes a length. ThisNicholas Clark2007-01-151-2/+1
| | | | | allows symbolic code references with embeded NULs to work. p4raw-id: //depot/perl@29830
* An implementation of change 29735 for blead (PL_curcop could be NULL)Nicholas Clark2007-01-101-2/+3
| | | | | given that blead's refactoring is not yet in maint. p4raw-id: //depot/perl@29748
* Update copyright years in .c filesRafael Garcia-Suarez2007-01-051-1/+1
| | | p4raw-id: //depot/perl@29696
* 4th patch from: Marcus Holland-Moritz2007-01-041-2/+2
| | | | | | | | | Subject: [PATCH] Cleanup SVf arguments (2nd try) Message-ID: <20070101201613.4120d9ef@r2d2> Introduce an SVfARG() macro for %SVf (%-p here) arguments to perl's printf p4raw-id: //depot/perl@29687
* Re: [PATCH] Change implementation of %+ to use a proper tied hash interface ↵Yves Orton2007-01-041-39/+69
| | | | | | | and add support for %- Message-ID: <9b18b3110612291245q792fe91cu69422d2b81bb4f0b@mail.gmail.com> p4raw-id: //depot/perl@29682
* Unshare the shared string gp_file_hek only if it exists in a GP.Rafael Garcia-Suarez2006-12-221-1/+2
| | | | | | | | Not doing this will produce invalid frees in the global destruction process, probably because the empty string will get freed several times. This should be safe since gp_file_hek is only assigned a new value with share_hek(). p4raw-id: //depot/perl@29610