summaryrefslogtreecommitdiff
path: root/sv.c
Commit message (Collapse)AuthorAgeFilesLines
* Add a new macro SvVSTRING_mg that returns vstring magic, if any.Rafael Garcia-Suarez2006-05-171-1/+1
| | | | | | SvVOK used to do that, in stealth mode, but now it returns a boolean like it used to. Patch suggested by John Peacock. p4raw-id: //depot/perl@28218
* Re: [perl #39145] win32, @_ and fork crashing in dounwindDavid Mitchell2006-05-171-0/+2
| | | | | | | Message-ID: <20060517163816.GN17109@iabyn.com> (Dave's fix, plus a test taken from [perl #39145]) p4raw-id: //depot/perl@28215
* sv.c: printf %d wants int not size_tJarkko Hietaniemi2006-05-131-2/+3
| | | | | | Message-Id: <200605130715.k4D7FWg3089581@kosh.hut.fi> Date: Sat, 13 May 2006 10:15:32 +0300 (EEST) p4raw-id: //depot/perl@28186
* Re: [PATCH] my_snprintfJarkko Hietaniemi2006-05-121-14/+4
| | | | | Message-ID: <4464E1F1.9010706@gmail.com> p4raw-id: //depot/perl@28183
* The upgrade/croak order in Perl_sv_utf8_encode() seemed utterlyNicholas Clark2006-05-121-1/+1
| | | | | backwards. It now checks for readonly *first*. p4raw-id: //depot/perl@28178
* Tk spots that S_glob_2pv might be called from *_nolen, so we need toNicholas Clark2006-05-111-1/+3
| | | | | check that len is non-NULL before assigning to it. p4raw-id: //depot/perl@28171
* optimize S_find_array_subscriptAndy Lester2006-05-031-6/+7
| | | | | Message-ID: <20060503020908.GA2234@petdance.com> p4raw-id: //depot/perl@28078
* Remove a variable left unused since change 28065.Nicholas Clark2006-05-021-1/+0
| | | p4raw-id: //depot/perl@28070
* Add a new hash key flag HVhek_UNSHARED, to mark all unshared hash keys.Nicholas Clark2006-05-021-2/+5
| | | | | | Otherwise Perl_newSVhek(), called by Perl_hv_iterkeysv(), naively assumes that it can share any hash key directly. p4raw-id: //depot/perl@28069
* Assert that SvMAGIC() isn't being called on PVMGs which are using theNicholas Clark2006-05-021-6/+4
| | | | | same union to store the stash for our. p4raw-id: //depot/perl@28065
* GvFILE() cannot be a pointer to the memory owned by the COP, becauseNicholas Clark2006-05-021-1/+1
| | | | | | | COPs created by use can be freed along this memory, but the GP remains. Given that several GVs may refer to the same file, use a shared string rather than an individual allocation per GP. p4raw-id: //depot/perl@28060
* more -ansi -pedantic cleanlinessJarkko Hietaniemi2006-04-291-1/+1
| | | | | Message-ID: <44532024.9070303@gmail.com> p4raw-id: //depot/perl@28010
* reduce gcc -ansi -pedantic noise plus a suggestionJarkko Hietaniemi2006-04-281-7/+7
| | | | | Message-ID: <44527402.8000506@gmail.com> p4raw-id: //depot/perl@28008
* dVAR (-DPERL_GLOBAL_STRUCT_PRIVATE) updateJarkko Hietaniemi2006-04-281-0/+1
| | | | | Message-ID: <44510AF6.6040603@gmail.com> p4raw-id: //depot/perl@27990
* Re: [PATCH] use snprintf/strlcpy/strlcat when usefulJarkko Hietaniemi2006-04-281-2/+13
| | | | | Message-ID: <444E3EFB.8020503@gmail.com> p4raw-id: //depot/perl@27987
* Removing unused contextAndy Lester2006-04-271-15/+13
| | | | | Message-ID: <20060427053215.GA31445@petdance.com> p4raw-id: //depot/perl@27976
* Re: [PATCH] cleanup 212 warnings emitted by gcc-4.2Marcus Holland-Moritz2006-04-261-3/+3
| | | | | Message-ID: <20060424232038.7550f9b6@r2d2> p4raw-id: //depot/perl@27962
* use NOOP macroAndy Lester2006-04-251-7/+7
| | | | | Message-ID: <20060424184451.GA1479@petdance.com> p4raw-id: //depot/perl@27958
* Change 27947 forgot to remove one now-unneeded cast.Nicholas Clark2006-04-241-1/+1
| | | p4raw-id: //depot/perl@27949
* Following change 27942 it's clear that the return type ofNicholas Clark2006-04-241-7/+7
| | | | | | glob_2inpuv_number() should change. Rename it and glob_2inpuv() to reflect what they do. p4raw-id: //depot/perl@27947
* Refactor S_glob_2inpuvAndy Lester2006-04-241-23/+30
| | | | | Message-ID: <20060424021239.GA5449@petdance.com> p4raw-id: //depot/perl@27942
* Given that use re 'debug' can turn on DEBUGGING even on a non-DEBUGGINGNicholas Clark2006-04-211-2/+0
| | | | | | build, we cannot assume that PL_reg_starttry isn't needed. So copy it in Perl_ss_dup. p4raw-id: //depot/perl@27930
* op_type shrinkingAndy Lester2006-04-201-6/+7
| | | | | Message-ID: <20060420041653.GA28523@petdance.com> p4raw-id: //depot/perl@27910
* Calling cv_undef() on the CV created by newCONSTSUB() would leak likeNicholas Clark2006-04-191-7/+9
| | | | | | | | | | a Jumblie's preferred maritime craft. To free CvFILE for this case, take advantage of the 0 length prototype that will also be there, and hang it from the prototype. To do this properly means changing code to actually pay attention to SvCUR() on prototypes. It turns out that we always know the length of the prototype string, so this may be faster. Certainly, it's a memory saving (even ignoring the leak). p4raw-id: //depot/perl@27896
* Revert change 27818, as change 27853 fixes the real bug.Nicholas Clark2006-04-171-3/+1
| | | p4raw-id: //depot/perl@27862
* Fix bug introduced with change 27841. (len + 1, not just len).Nicholas Clark2006-04-161-1/+1
| | | p4raw-id: //depot/perl@27852
* In Perl_sv_usepvn_flags, assert() that the caller has RTFM.Nicholas Clark2006-04-161-0/+3
| | | p4raw-id: //depot/perl@27842
* Provide a new flag for sv_usepvn_flags, SV_HAS_TRAILING_NUL, whichNicholas Clark2006-04-161-7/+16
| | | | | | | signals that the buffer passed in is already well-formed for use as SvPVX (i.e. it is followed by a trailing NUL), and hence the realloc() to add a NUL can be skipped. p4raw-id: //depot/perl@27841
* Merge sv_usepvn and sv_usepvn_mg into sv_usepvn_flags. "Promote" theNicholas Clark2006-04-161-19/+8
| | | | | other two to mathoms.c p4raw-id: //depot/perl@27840
* In Perl_sv_usepvn(), force a move under DEBUGGING to shake out callerNicholas Clark2006-04-161-0/+11
| | | | | bugs. p4raw-id: //depot/perl@27839
* Deep in the bowels of creating new and exciting bugs, I managed toNicholas Clark2006-04-151-1/+3
| | | | | | segfault the uninitialised value reporting code. This protects against the segfault. p4raw-id: //depot/perl@27818
* Change SAVECOPWARNINGS(c) to SAVECOMPILEWARNINGS() - it's only used toNicholas Clark2006-04-141-15/+3
| | | | | | | save the warnings on PL_compiling, so constraining its use to what we can test seems to make sense. Particularly as testing Perl_ss_dup is tricky. p4raw-id: //depot/perl@27805
* S_glob_2inpuv() did not check if lenp was NULL. Oops.Nicholas Clark2006-04-141-1/+5
| | | p4raw-id: //depot/perl@27803
* doop.c: (Coverity) found a bug but not quite what Coverity thought it did ↵Jarkko Hietaniemi2006-04-141-6/+8
| | | | | | | (try valgrind on the new bop.t without the doop.c patch) Message-Id: <20060413162046.5F9636D08C@ugli.hut.fi> p4raw-id: //depot/perl@27801
* eliminate PL_regbol PL_regtill PL_regnarrate PL_reg_ganch PL_reg_svDave Mitchell2006-04-131-8/+0
| | | | | (only another 434 to go ...) p4raw-id: //depot/perl@27794
* For duping SAVEHINTS it rather helps if you pay attention to what isNicholas Clark2006-04-131-2/+2
| | | | | actually being pushed onto the save stack. p4raw-id: //depot/perl@27790
* Add a break; to the end of the SAVEt_COP_WARNINGS case, and don't tryNicholas Clark2006-04-131-3/+6
| | | | | to dereference cop_hints if it's NULL. p4raw-id: //depot/perl@27787
* Add SAVEt_COP_WARNINGS to ss_dup.Nicholas Clark2006-04-131-0/+15
| | | p4raw-id: //depot/perl@27785
* eliminate PL_reg_reDave Mitchell2006-04-131-2/+0
| | | | | (only another 439 to go ...) p4raw-id: //depot/perl@27783
* Change cop_warnings from an SV holding the warnings bitmask to aNicholas Clark2006-04-121-2/+1
| | | | | | | directly (shared) malloc()ed buffer holding the warnings bitmask. This avoids bugs/crashes when the interpreter that created an optree is freed but the optree remains in use by other interpreters. p4raw-id: //depot/perl@27779
* Remove the final recursion path from S_regmatch: (??{...})Dave Mitchell2006-04-121-2/+0
| | | | | | | Also put PUSH/POP_STATE infastructure in place Also eliminate PL_reg_call_cc (only another 440 global vars to go ...) p4raw-id: //depot/perl@27778
* First stab at using the pad to store the serialised hints data.Nicholas Clark2006-04-111-3/+9
| | | | | | This approach is almost certainly not only wrong, but also doomed. But it's needed to build a correct solution. p4raw-id: //depot/perl@27768
* Within Perl_newSVhek, inline most of newSVpvn_share(), becauseNicholas Clark2006-04-111-3/+17
| | | | | share_hek_hek() is far more efficient than sharepvn(). p4raw-id: //depot/perl@27767
* Stop Perl_newSVpvn_share() potentially leaking the return result fromNicholas Clark2006-04-111-0/+4
| | | | | bytes_from_utf8(). p4raw-id: //depot/perl@27766
* Fix pointer error in change 27741, spotted by John E. Malmberg.Nicholas Clark2006-04-091-2/+2
| | | p4raw-id: //depot/perl@27752
* sv.c, rs.t, perlvar.pod (Coverity finding: did you know what happens with ↵Jarkko Hietaniemi2006-04-081-5/+5
| | | | | | | | | | $/=\0?) Message-Id: <20060408152533.C4D5F6D08C@ugli.hut.fi> (although I should add that this version of Coverity is actually raising a false positive here, albeit something still interesting) p4raw-id: //depot/perl@27744
* As av_dup, gv_dup and hv_dup are the same as sv_dup, code in variousNicholas Clark2006-04-081-25/+8
| | | | | branches of Perl_ss_dup() is actually duplicated, so can be merged. p4raw-id: //depot/perl@27741
* By swapping the order of pushes onto the save stack forNicholas Clark2006-04-081-6/+1
| | | | | SAVEt_GENERIC_PVREF, we can merge it with SAVEt_PPTR in Perl_ss_dup(). p4raw-id: //depot/perl@27740
* Teach ss_dup about SAVEt_RE_STATE. (As correctly as it ever was before)Nicholas Clark2006-04-081-0/+72
| | | p4raw-id: //depot/perl@27739
* ss_dup of SAVEt_COP_ARYBASE can use the same code as SAVEt_I8.Nicholas Clark2006-04-081-0/+1
| | | p4raw-id: //depot/perl@27738