summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* add missing STATIC to S_finalize_opDavid Mitchell2011-10-111-1/+1
| | | | | This function was declared static in embed.fnc, but the actual function definition was missing the 'STATIC'.
* XS::APItest: s/justinc/justisa/Father Chrysostomos2011-10-102-2/+2
| | | | | | I meant to call this mro ‘just @ISA’, because it just uses @ISA and no super-superclasses. But I misnamed it. It has nothing to do with @INC.
* Also add repaired variants for CV and SVREF typemapsSteffen Mueller2011-10-115-7/+100
|
* A repaired, properly refcounting AV&HV typemapSteffen Mueller2011-10-115-3/+112
| | | | | | The T_AVREF_REFCOUNT_FIXED and T_HVREF_REFCOUNT_FIXED can be used in place of T_AVREF/T_HVREF. They do away with having to remember to decrement refcounts manually.
* [perl #94306] Do not skip first elem of linear isaFather Chrysostomos2011-10-104-0/+58
| | | | | | | | | | Perl has assumed up till now that the first element of an isa linear- isation is the name of the class itself. That is true for dfs and c3, but not requiring that makes it easier for plugin authors. Since various parts of the mro code make that assumption, this commit copies the AV returned by mro_alg.resolve to a new one beginning with the class’s own name, if the original AV did not include it.
* Document calling convention for Perl_mro_registerFather Chrysostomos2011-10-102-1/+10
| | | | I had to look in embed.fnc to find this out when I wanted to use it.
* Stop attribute errors from leaking op treesFather Chrysostomos2011-10-102-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit moves attribute handling in newATTRSUB so that it happens after the op tree is attached to the sub. So when the sub is freed, the op tree goes with it, instead af leaking when an attribute han- dler dies. Witness what happens without that: $ PERL_DESTRUCT_LEVEL=2 ./perl -Ilib -le 'BEGIN {$^H{a}="b"}; sub foo:bar{1}' Invalid CODE attribute: bar at -e line 1 BEGIN failed--compilation aborted at -e line 1. Unbalanced string table refcount: (1) for "a" at (null) line 1 during global destruction. It was the ‘Unbalanced string table’ warnings that alerted me to the problem. The fairly new t/uni/attrs.t happens to trigger this bug. Not that this told me anything, but I did a binary search which lead me to this commit: commit b3ca2e834c3607fd8aa8736a51aa3a2b8bba1044 Author: Nicholas Clark <nick@ccl4.org> Date: Fri Mar 31 13:45:57 2006 +0000 Serialise changes to %^H onto the current COP. Return the compile time state of %^H as an eleventh value from caller. This allows users to write pragmas. That commit started indirectly storing HEKs in cops (in the hints hash), which means we have an easy way to tell when ops are leaking.
* under DEBUGGING, minimize the sentinels written in sv_chop, to avoid substr ↵Chip Salzenberg2011-10-101-12/+14
| | | | slowdown
* tweak sv_chop podChip Salzenberg2011-10-101-0/+5
|
* do not return useless value from void-context substrChip Salzenberg2011-10-101-9/+14
|
* I32 may not be big enough for string insert lengthChip Salzenberg2011-10-101-1/+1
|
* Avoid creating extra SVs in gv_fullname4Father Chrysostomos2011-10-101-7/+7
|
* Fix cv-to-gv assignment to use CvPROTOFather Chrysostomos2011-10-102-3/+7
| | | | | | | | | | The SvPVX field of a XS AUTOLOAD sub can contain both the prototype and the name of an AUTOLOADed sub. The CvPROTO macro knows where in the buffer to find the prototype. All code that reads the prototype should use it. When I introduced it with commit 8fa6a4095, one code path was missed: *regular_prototyped_sub = \&prototyped_XS_AUTOLOAD was using the sub name of the rhs, instead of the prototype, in the prototype check.
* gv.c:gv_autoload_pvn: Avoid warning due to temp flagFather Chrysostomos2011-10-101-0/+1
|
* Resolve XS AUTOLOAD-prototype conflictFather Chrysostomos2011-10-098-16/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Did you know that a subroutine’s prototype can be modified with s///? Don’t look: *AUTOLOAD = *Internals'SvREFCNT; my $f = "Just another "; eval{main->$f}; print prototype AUTOLOAD; $f =~ s/Just another /Perl hacker,\n/; print prototype AUTOLOAD; You did look, didn’t you? You must admit that’s creepy. The problem goes back to this: commit adb5a9ae91a0bed93d396bb0abda99831f9e2e6f Author: Doug MacEachern <dougm@covalent.net> Date: Sat Jan 6 01:30:05 2001 -0800 [patch] xsub AUTOLOAD fix/optimization Message-ID: <Pine.LNX.4.10.10101060924280.24460-100000@mojo.covalent.net> Allow AUTOLOAD to be an xsub and allow such xsubs to avoid use of $AUTOLOAD. p4raw-id: //depot/perl@8362 which includes this: + if (CvXSUB(cv)) { + /* rather than lookup/init $AUTOLOAD here + * only to have the XSUB do another lookup for $AUTOLOAD + * and split that value on the last '::', + * pass along the same data via some unused fields in the CV + */ + CvSTASH(cv) = stash; + SvPVX(cv) = (char *)name; /* cast to loose constness warning */ + SvCUR(cv) = len; + return gv; + } That ‘unused’ field is not unused. It’s where the prototype is stored. So, not only is it clobbering the prototype, it’s also leak- ing it by assigning over the top of SvPVX. Furthermore, it’s blindly assigning someone else’s string, which could be freed before it’s even used. Since it has been documented for a long time that SvPVX contains the name of the AUTOLOADed sub, and since the use of SvPVX for prototypes is documented nowhere, we have to preserve the former. So this commit makes the prototype and the sub name share the same buffer, in a manner resembling that which CvFILE used before I changed it with bad4ae38. There are two new internal macros, CvPROTO and CvPROTOLEN for retriev- ing the prototype.
* Tests for XS AUTOLOAD routinesFather Chrysostomos2011-10-094-0/+27
|
* Fix up pad_check_dup entry in perlinternFather Chrysostomos2011-10-091-4/+6
| | | | | | | | | | | | | | | | | | | | | | | When the pad API was added, the special m|pad_check_dup|SV *name|U32 flags|const HV *ourstash sequence was added to pad.c, but that is unnecessary as it is listed in embed.fnc. Also it is not correct, as the name of the function is in the return value field. So this restore it back to the simple ‘=for apidoc pad_check_dup’. The description of the function was in plain text like this: Check for duplicate declarations: report any of: * a my in the current scope with the same name; * an our (anywhere in the pad) with the same name and the same stash as C<ourstash> C<is_our> indicates that the name to check is an 'our' declaration which gets rewrapped in rendered pod. So this patch changes it to use a verbatim block (as autodoc.pl doesn’t seem to like pod lists).
* Update docs for XS AUTOLOADFather Chrysostomos2011-10-092-2/+6
| | | | | This mentions the UTF8 flag and moves the discussion to perlapi, where it belongs, IMHO.
* Update Unicode-Collate to CPAN version 0.80Chris 'BinGOs' Williams2011-10-0929-244/+872
| | | | | | | | | | | | | | | | | [DELTA] 0.80 Sun Oct 9 21:00:21 2011 - U::C::Locale newly supports locales: bs, hi, kn, kok, ln. - added loc_bs.t, loc_hi.t, loc_kn.t, loc_kok.t, loc_ln.t in t. - updated some locales to CLDR 2.0 : ha, hr, kk, lt. 0.79 Sun Oct 2 20:31:01 2011 - pod: [rt.cpan.org #70241] Fix minor grammar error in manpage by Harlan Lieberman-Berg. - 'suppress' no longer affects contractions via 'entry'. - U::C::Locale newly supports locales: as, fi__phonebook, gu. - added loc_as.t, loc_fiph.t, loc_gu in t. - updated some locales to CLDR 2.0 : ar, be, bg.
* bisect-runner.pl needs the linux.sh libpth mutli-arch search logic.Nicholas Clark2011-10-091-1/+19
| | | | Without this, Configure can't find libm.so on mutli-arch Linux systems.
* perldelta: s/nul\k/l/gFather Chrysostomos2011-10-081-4/+4
| | | | | | Other parts of the documentation already refer to it as a ‘null byte’ or ‘null’, which looks much nicer, as it is a real English word.
* Correct SvEND docsFather Chrysostomos2011-10-081-1/+6
| | | | | SvEND does not point to the last character, but to a spot just after it.
* Rewrite sv_catsv to pass SV_CAT* flags to sv_catpvnFather Chrysostomos2011-10-081-27/+5
| | | | | | | | | | | | | | | | | (Both functions actually end with _flags, but I’m trying to keep the first line short.) Now that sv_catpvn_flags has this functionality (as of c682ebef86), sv_catsv can use it, which avoids creating an extra SV for the utf8+bytes case and removes some duplicate logic. Also, one code path in sv_utf8_upgrade_flags_grow was ignore the _grow, causing crashes after the sv_catsv change, so this patch fixes that, too. Also, sv_catpvn_flags was not allocating a byte for the trailing nul, which was entirely my fault (c682ebef86). So that is hereby fixed as well.
* mro.c:S_gather_and_rename: Avoid extra SVsFather Chrysostomos2011-10-081-15/+11
|
* Dont’t crash when warning about XSUB redefinitionFather Chrysostomos2011-10-082-3/+14
| | | | | | | | If the stash in question has no name, the attempt to generate the warning will cause a crash. Simply skipping the warning is this case is fine, as this is will into ‘undefined’ territory (but it still shouldn’t crash).
* perldelta: Document fix for not matching non-Unicode \p{}Karl Williamson2011-10-081-1/+6
| | | | This documentes commit 0bda3001dd6310abfca950134ed78f6192d3d8a7
* Tweak the documentation for bisect-runner.plNicholas Clark2011-10-081-12/+12
| | | | | Use F<> consistently when describing files. Remove --target=perl from an example in the synopsis.
* Use full sym name in isIDFIRST_utf8 to fix [perl #100930]Father Chrysostomos2011-10-071-1/+1
| | | | | | _is_utf8__perl_idstart is not an API function, so the short _is_utf8__perl_idstart form cannot be used in public macros. The long form (Perl__is_utf8__perl_idstart) must be used.
* bisect-runner.pl disables building DB_File if it can't patch the XS code.Nicholas Clark2011-10-081-37/+51
| | | | | | | | | | | Automatically disable the build of DB_File for commits earlier than ccb44e3bf3be2c30, as it's not practical to patch DB_File 1.70 and earlier to build with current Berkeley DB headers. This can be overridden with -Unoextensions This should now permit building to 'test_prep' on systems with Berkeley DB installed, for 5.005_62 and earlier.
* bisect-runner.pl now emulates -Dnoextensions if Configure doesn't provide it.Nicholas Clark2011-10-081-19/+31
|
* Don’t put malformed UTF8 in $AUTOLOADFather Chrysostomos2011-10-072-2/+14
|
* Removing modules should include updating referencesFather Chrysostomos2011-10-071-1/+1
|
* bisect-runner.pl needs to set @paths correctly on 32 bit LinuxNicholas Clark2011-10-071-2/+4
| | | | | | | | | | | Without this, Configure may fail prior to commit 1cfa4ec74d4933da (which added the 'ignore_versioned_solibs' logic), because bisect-runner.pl's code to set libs relies on successfully finding at least one library to pass to ./Configure with -Dlibs= miniperl and perl should now build back to perl-5.000 on 32 bit Linux. test_prep may not work, as early versions of DB_File.xs will fail if a new db.h is found.
* bisect-runner.pl should add db4 compatibility to DB_File.xs where possible.Nicholas Clark2011-10-071-1/+40
| | | | | | | | Without this it won't build if db.h is found, but it's "too new" for the checked-out vintage XS code. Tweak apply_patch() to print out any patch that fails to apply. This helps with debugging patches generated dynamically by bisect-runner.pl
* bisect-runner.pl must build CombiningClass.pl before Unicode::Normalize.Nicholas Clark2011-10-071-0/+46
| | | | | | The Makefile.PL for Unicode::Normalize needs lib/unicore/CombiningClass.pl. Even without a parallel build, we need a dependency to ensure that it builds first. This problem was solved in blead with commit 9f3ef600c170f61e.
* renumber SVpad_STATE and free a bit in SvFLAGSDavid Mitchell2011-10-071-2/+3
| | | | | | SVpad_STATE is only used on SVs which hold PAD names; make it share the same flags bit as SVprv_WEAKREF/SVf_IVisUV. Together with the previous commit, this frees up a single bit in SvFLAGS, 0x00010000.
* make SVs_PADTMP and SVs_PADSTALE share a bitDavid Mitchell2011-10-076-30/+47
| | | | | | | | | | | SVs_PADSTALE is only meaningful with SVs_PADMY, while SVs_PADTMP is only meaningful with !SVs_PADMY, so let them share the same flag bit. Note that this doesn't yet free a bit in SvFLAGS, as the two bits are also used for SVpad_STATE, SVpad_TYPED. (This is is follow-on to 62bb6514085e5eddc42b4fdaf3713ccdb7f1da85.)
* Use HEKfFather Chrysostomos2011-10-076-58/+72
| | | | This avoids creating a lot of temporary SVs.
* HEKf256 formatFather Chrysostomos2011-10-073-3/+12
|
* Teach porting/diag.t about HEKfFather Chrysostomos2011-10-071-0/+1
|
* HEKf formatFather Chrysostomos2011-10-072-2/+17
|
* In bisect-runner.pl, "patch" ext/IPC/SysV/SysV.xs to the current SHMLBA code.Nicholas Clark2011-10-071-28/+61
| | | | | | | | | | | | | | For some historical revisions, it's not good enough simply taking out the first #include <asm/page.h>, because other code changes in that area can break the build. Instead, replace any old version of that #ifdef forest with the current code. Additionally, do this editing unconditionally, even if the target is "miniperl". Skipping it on target "miniperl" causes surprises if one is trying to debug the build by getting bisect-runner.pl to build to miniperl (or skip), and then using make lib/auto/IPC/SysV/SysV.so as the test case. This adds an edit_file() function. Move apply_patch() next to it, to group related functions together.
* use SSize_t for string offsets instead of int or socklen_tTony Cook2011-10-071-6/+8
| | | | | | | | | | | | | | | | | | | | Note: while I discovered the incorrect types while investigating [perl described in that report, so I don't consider this a fix for that bug. Unfortunately to test this change I'd need a scalar at least 2G in size, which unreasonable for a test we run on each install. Tested manually on a machine with plenty of memory: Before: [tonyc@dromedary perl]$ echo foo | ./perl -le '$x = ""; read(STDIN, $x, 4, 5000000000); print length $x' 705032708 After: [tonyc@dromedary perl]$ echo foo | ./perl -le '$x = ""; read(STDIN, $x, 4, 5000000000); print length $x' 5000000004
* document the behaviour of negative klen for hv_fetch and friendsTony Cook2011-10-071-12/+20
| | | | This interface is unfortunate, but it's there and in use.
* perldelta up to c60dbbc38Father Chrysostomos2011-10-071-2/+188
|
* Suppress some uninit warnings in gv.c:S_maybe_add_coresubFather Chrysostomos2011-10-071-4/+4
| | | | | | Suprisingly, gcc figured out that these were never used uninitialised when I had the body of this function as part of gv_fetchpvn_flags, but now it has trouble recognising that fact.
* Cast to signed before negating, to avoid compiler warningsBrian Fraser2011-10-0610-30/+31
|
* Clarification in perlre.pod about captures created inside a DEFINEBrian Fraser2011-10-061-0/+13
|
* perldelta up to 59c72abb9Father Chrysostomos2011-10-061-4/+55
|
* Make undef %overload:: test more likely to crashFather Chrysostomos2011-10-061-0/+1
| | | | | I think I omitted the blessing by mistake. Taken alone, this block does not crash in earlier versions without the bless.