summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Increase $DynaLoader'VERSION from 1.13 to 1.14,Father Chrysostomos2011-10-061-1/+1
| | | | in view of 2e3468793982.
* Remove "8-bit" reference from ord documentationJohn P Linderman2011-10-061-2/+1
| | | | | | See http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2011-10/msg00079.html for additional background.
* Set PERL_DL_NONLAZY in t/TEST to check existence of all symbolsGerard Goossen2011-10-061-0/+2
|
* Merge support for UTF8 symbolsFather Chrysostomos2011-10-06114-674/+8841
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This branch makes symbols support UTF8 internally, which means that Unicode is supported properly at the perl level. So ${"\xff"} will give you the same scalar, regardless of the internal encoding of the string. Also, many parts of the core are now nul-clean, too, as a result of the UTF8 changes, which means that ‘$m = "a\0b"; foo->$m’ will try to call the method named "a\0b", instead of just "a". Details follow. • New API functions: Many of these take a _flags parameter, which accept the SVf_UTF8 flag. • HvNAMELEN • HvNAMEUTF8 • HvENAMELEN • HvENAMEUTF8 • gv_init_pv(n)/sv • gv_fetchmeth_pv(n)/sv • gv_fetchmeth_pv(n)/sv_autoload • gv_fetchmethod_pv(n)/sv_flags — may change • gv_autoload_pv(n)/sv • newGVgen_flags • sv_derived_from_pv(n)/sv • sv_does_pv(n)/sv • whichsig_pv(n)/sv • New internal functions: • GvNAMEUTF8 • GvENAMELEN • GvENAME_HEK • CopSTASH_flags • CopSTASH_flags_set • PmopSTASH_flags • PmopSTASH_flags_set • sv_sethek • Parts of Perl that handle Unicode symbol names correctly: • Method names (including those passed to ‘use overload’) • Typeglob names (including variable and filehandle names)  • Package names • Constant subroutine names (not nul-clean yet) • goto • Symbolic dereferencing • Second argument to bless() and tie() • Return value of ref() • Package names returned by caller() • Subroutine prototypes • Attributes • Warnings and error messages that mention filehandles, packages, methods, variables, constant values, subroutines, symbolic refer- ences, format names and subroutine prototypes • Parts of Perl that now handle embedded nuls correctly: • Method names • Typeglob names (including filehandle names) • Package names • Autoloading • Return value of ref() • Package names returned by caller() • Filehandle warnings • Typeglob elements (*foo{"THING\0stuff"}) • Signal names • Warnings and error messages that mention (yes, it’s the same list as above) filehandles, packages, methods, variables, constant val- ues, subroutines, symbolic references, format names and subroutine prototypes • Other bug fixes • *{é} now treats é as the name of the glob (the usual implicit quoting), instead of treating it as a bareword (strict-unsafe) or function call. *{é} used to be equivalent to *{+é}, in other words. • Modified modules: • constant has been modified not to apply the workaround for the bug that this branch fixes, if that workaround does not apply. • attributes has been modified as part of making Unicode attri- butes work. • XS::APItest • mro, as part of making method lookup account for Unicode. • Side effects • Blessing into "\0" no longer causes ref() to return false. • *{"*é::..."} is now equivalent to *{"é::..."}, just as *{"*e::..."} is equivalent to *{"e::..."}. Previously, the * was only stripped if followed by [A-Za-z]. • $é is now subject to ‘Used only once’ warnings. It used to be exempt, as the code that checked the named considered it a punctu- ation variable.
| * Correct skip counts for miniperlFather Chrysostomos2011-10-062-2/+2
| |
| * Increase $mro::VERSION from 1.08 to 1.09Father Chrysostomos2011-10-061-1/+1
| |
| * Increase $attributes::VERSION from 0.16 to 0.17Father Chrysostomos2011-10-061-1/+1
| |
| * Increase $XS::APItest::VERSION from 0.31 to 0.32Father Chrysostomos2011-10-061-1/+1
| |
| * Increase $constant::VERSION from 1.22 to 1.23Father Chrysostomos2011-10-061-1/+1
| |
| * uni/universal.t tests passingFather Chrysostomos2011-10-061-8/+2
| |
| * Rewrite -l warning test to account for 433644eedFather Chrysostomos2011-10-061-6/+3
| |
| * Restore whichsig to the list in perlapiFather Chrysostomos2011-10-062-0/+4
| |
| * whichsig nul-cleanup.Brian Fraser2011-10-0610-24/+137
| | | | | | | | | | This adds _pv, _pvn, and _pv versions of whichsig() in mg.c, which get both kill "NAME" and %SIG lookup nul-clean.
| * toke.c, ext/attributes/attributes.xs: Make attributes UTF-8 clean.Brian Fraser2011-10-064-3/+199
| |