summaryrefslogtreecommitdiff
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* Emit warning for use re "/ul"Father Chrysostomos2010-12-042-1/+32
| | | | | | | This was an omission on my part. This should perhaps be an error, but I am just following what ‘use re’ already does with ‘use re "whatever"’.
* [perl #80098] Bleadperl breaks Attribute::LexicalFather Chrysostomos2010-12-021-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If @UNIVERSAL::ISA = "a"; and @a::ISA = "b"; then methods are searched for in these orders: main UNIVERSAL a b UNIVERSAL a b UNIVERSAL a b a b UNIVERSAL a b b UNIVERSAL a b For method lookup, looking at a stash twice causes no problems (except for a SUPER bug I’ve just found--to be dealt with separately). My fix to next::method in a5cd004 which made it do a second pass with UNIVERSAL the way gv_fetchmeth does did not take into account that it might return its caller (sub a::foo { return shift->next::can }), causing an infinite loop. This patch makes it check, on the second pass, whether each stash is the stash at the start of the MRO list and breaks if that is the case, so the MROs are effectively: main UNIVERSAL a b UNIVERSAL a b a b UNIVERSAL b UNIVERSAL a (which is what they are effectively already for method lookup).
* ++substr $mro'VERSION, -1Father Chrysostomos2010-12-011-1/+1
|
* [perl #68654] next::method doesn't see UNIVERSALFather Chrysostomos2010-12-011-0/+14
| | | | | This commit makes next::method retry with UNIVERSAL if it reaches the end of the MRO list.
* Avoid two compiler warnings in B::cstring, spotted by Steve Hay's smoker.Nicholas Clark2010-12-012-3/+3
|
* Fix B test failure introduced in 6b7c6d9Florian Ragwitz2010-12-011-4/+4
|
* [perl #77762] Constant assignment warningFather Chrysostomos2010-11-302-12/+12
| | | | | | | | | | | | With this patch: $ ./perl -we 'sub A () {1}; if (0) {my $foo = A or die}' $ ./perl -we 'sub A () {1}; if (0) {my $foo = 1 or die}' Found = in conditional, should be == at -e line 1. Since the value of a constant may not be known at the time the program is written, it should be perfectly acceptable to do a constant assign- ment in a conditional.
* Add tests for sv_{,un}magicext and mg_findextFlorian Ragwitz2010-11-302-0/+60
|
* ++substr $re::VERSION, -1Father Chrysostomos2010-11-281-1/+1
|
* Tiny pod fixAndreas J. Koenig2010-11-281-1/+1
|
* Increase Socket.pm’s versionFather Chrysostomos2010-11-271-1/+1
|
* Increase PerlIO::scalar’s versionFather Chrysostomos2010-11-271-1/+1
|
* [perl #78716] Bogus read after seek beyond end of stringFather Chrysostomos2010-11-272-3/+11
| | | | | This is a signedness problem that ffe0bb5ab did not take into account. (STRLEN)-10 > 0 returns true for me.
* [perl #78810] PERLDB_NOOPT ignored by adjacent nextstate optimisationFather Chrysostomos2010-11-261-1/+11
| | | | | As mentioned in the RT ticket, ac56e7d did not take PERLDB_NOOPT into account.
* [PATCH 4/5] Adjust unit tests to cope with new sockaddr_in6 functions in ↵Paul Evans2010-11-251-1/+2
| | | | | | Socket (pulled in via IO::Socket) Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
* [PATCH 3/3] Provide wrappers for IN6ADDR_ANY and IN6ADDR_LOOPBACKPaul Evans2010-11-252-0/+19
| | | | Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
* [PATCH 2/3] Implement sockaddr_in6 wrapperPaul Evans2010-11-251-1/+20
| | | | Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
* [PATCH 1/3] Implement Socket::pack_sockaddr_in6() and unpack_sockaddr_in6()Paul Evans2010-11-253-1/+97
| | | | Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
* Test dumping stashes, with various combinations of NAME and ENAME.Nicholas Clark2010-11-251-0/+68
|
* Refactor Peek.t to give more useable diagnostics.Nicholas Clark2010-11-251-39/+36
| | | | | | Change the numeric test IDs to meaningful names. Provide the names as test descriptions. Describe the purpose of the second test. Only output the line numbers if the tests fail. Swap from an explicit plan to done_testing().
* %x can't be used directly with pointers.Ben Morrow2010-11-221-4/+4
| | | | | (I keep forgetting this.) Change the four occurrences in the new custom op tests to UVxf with a PTR2UV around the pointer.
* Make perlio line buffer VMS record-oriented files on output.Craig A. Berry2010-11-171-1/+31
| | | | | | | | | | | | | | | | | | | | | When perlio flushes down to the unix layer, it can introduce a spurious record boundary when writing to a record-oriented file. Perl may create such files when doing edit-in-place or any other context where the file format is inherited from a previous version of the file. The problem can be eliminated by enabling line buffering on such files when they are opened. This was a regression in 5.10.0 since before that stdio's buffering performed the same function. N.B. Lines longer than the size of the perlio buffer will still result in multiple records -- a larger buffer may be necessary. For more details and discussion see: http://www.nntp.perl.org/group/perl.vmsperl/2010/11/msg15419.html Thanks to Martin Zinser for the problem report.
* Tests for the new custom op registrations.Ben Morrow2010-11-142-0/+191
|
* Improve custom OP support.Ben Morrow2010-11-141-4/+11
| | | | | | | | | | | | | | | | | Change the custom op registrations from two separate hashes to one hash holding structure pointers, and add API functions to register ops and look them up. This will make it easier to add new properties of custom ops in the future. Copy entries across from the old hashes where necessary, to preserve compatibility. Add two new properties, in addition to the already-existing 'name' and 'description': 'class' and 'peep'. 'class' is one of the OA_*OP constants, and allows B and other introspection mechanisms to work with custom ops that aren't BASEOPs. 'peep' is a pointer to a function that will be called for ops of this type from Perl_rpeep. Adjust B.xs to take account of the new properties, and also to give custom ops their registered name rather than simply 'custom'.
* Increase B’s versionFather Chrysostomos2010-11-141-1/+1
|
* Fix multiplicity build, broken by 328552296d8d53b3.Nicholas Clark2010-11-141-2/+2
| | | | It wrongly had #ifdef USE_ITHREADS, which should have been #ifdef MULTIPLICITY.
* Add Perl_bytes_cmp_utf8() to compare character sequences in different encodingsNicholas Clark2010-11-112-0/+45
| | | | | | | | | | | | | | | | | | | | | | | Convert sv_eq_flags() and sv_cmp_flags() to use it. Previously, to compare two strings of characters, where was was in UTF-8, and one was not, you had to either: 1: Upgrade the second to UTF-8 2: Compare the resulting octet sequence 3: Free the temporary UTF-8 string or: 1: Attempt to downgrade the first to bytes. If it can't be, they aren't equal 2: Else compare the resulting octet sequence 3: Free the temporary byte string Which for the general case involves a malloc()/free() and at least two O(n) scans per comparison. Whereas this approach has no allocation, a single O(n) scan, which terminates as early as the best case for the second approach.
* [perl #78964] Fix ext/XS-APItest/t/overload.tJerry D. Hedden2010-11-111-1/+1
| | | | | | | | | Attached patch fixes the following warning from 'make test': ext/XS-APItest/t/overload...................................."my" variable $got masks earlier declaration in same scope at t/overload.t line 81. ok
* Test that Opcode loads without warnings.Nicholas Clark2010-11-091-3/+13
| | | | This will fail if there are untagged ops.
* Tidy up ext/Opcode/t/Opcode.t.Nicholas Clark2010-11-091-10/+10
| | | | | Convert a loop with a die into regular tests. Don't declare lexicals ahead of use. Don't even declare a lexical @o3, which isn't used.
* Convert ext/Opcode/t/Opcode.t to Test::More.Nicholas Clark2010-11-091-39/+39
| | | | The tests (including the still-TODO) mostly date from 1996.
* Fix error in tryAMAGICunDEREF() introduced in 25a9ffce153b0e67.Nicholas Clark2010-11-092-22/+60
| | | | tryAMAGICunDEREF() isn't used anywhere in the core. Add tests for it.
* Delete paragraphs from mro.pm’s podFather Chrysostomos2010-11-081-16/+0
| | | | which are no longer relevant
* Avoid a declaration after statement, accidentally added by 6079961fee8cf49c.Nicholas Clark2010-11-081-1/+2
| | | | | Code in ext/ isn't subject to the same compiler warnings regime as the top-level core files, hence why this was missed.
* In B.xs, remove the now unused first argument from make_sv_object().Nicholas Clark2010-11-081-35/+30
| | | | | After the previous change, all callers were passing in NULL and letting it generate a new mortal SV for them.
* In B.xs, use PPCODE rather than a typemap for output of T_SV_OBJNicholas Clark2010-11-082-56/+47
| | | | | This actually reduces both source code size and object code size (the latter by almost 1K on this platform).
* B::MAGIC::LENGTH(), not B::MAGIC::LEN(). Fixes #78864Nicholas Clark2010-11-081-1/+1
| | | | | b2adfa9b5e1682df inadvertently changed the name of the accessor for mg->mg_len to B::MAGIC::LENGTH. Fix this.
* In B.xs refactor cc_opclassname() to make_op_object().Nicholas Clark2010-11-082-34/+25
| | | | | | | | | | | | | | All bar one of the callers to cc_opclassname() were using it in the same way - to pass as the second argument of newSVrv(), whose first argument was a new mortal, and return value was used with sv_setiv() and PTR2IV(). So clearly *that* is the common code needed. Inline the existing code (all 1 line of it) in the other location that called cc_opclassname(). As the typemap was using cc_opclassname(), replace the 4 implicit uses of it with explicit PPCODE sections. Curiously, removing the use of this typemap actually reduces the line count of B.xs On this platform, this reduces the object code size by almost .5K.
* Merge the implementation of B::COP::{io,warnings} using ALIAS.Nicholas Clark2010-11-081-14/+5
| | | | On this platform, this reduces the object size by about .5K.
* In B.xs, refactor make_warnings_object() to take a COP * instead of STRLEN *.Nicholas Clark2010-11-081-2/+3
|
* Merge the implementation of B::COP::{filegv,stash} using ALIAS.Nicholas Clark2010-11-081-7/+7
| | | | | On this platform, this reduces the object size by about 400 bytes for a threaded build.
* Merge the implementation of B::COP::{file,stashpv} using ALIAS.Nicholas Clark2010-11-081-6/+6
| | | | | On this platform, this reduces the object size by about .5K, for an unthreaded build.
* Merge the implementation of B::BM::TABLE with B::PV::{PV,PVX,PVBM} using ALIAS.Nicholas Clark2010-11-081-13/+7
| | | | On this platform, this reduces the object code size by about .5K.
* Remove unneeded PREFIXes from B.xs.Nicholas Clark2010-11-081-20/+20
|
* Merge the implementation of B::PV::PVBM with PVX and PV, using ALIAS.Nicholas Clark2010-11-081-12/+12
|
* Merge the implementation of B::PV::{PVX,PV} using ALIAS.Nicholas Clark2010-11-081-5/+6
| | | | On this platform, this reduces the object size by .5K.
* Refactor B::PV::PV to use newSVpvn_flags() for both arms of the if.Nicholas Clark2010-11-081-4/+9
| | | | newSVpvn_flags(NULL, whatever, SVs_TEMP) is equivalent to sv_newmortal().
* Merge the implementation of B::REGEXP::{REGEXP,precomp} using ALIAS.Nicholas Clark2010-11-081-11/+10
|
* In B::REGEX::precomp, use newSVpvn_flags() instead of newSVpvn().Nicholas Clark2010-11-081-5/+3
| | | | | | Using newSVpvn_flags() and SVt_TEMP and an explicit push is one API call. newSVpvn() and RETVAL results in a second API call, sv_2mortal(), in the return typemap.
* In B.xs, move the version dependant regexp code to be adjacent.Nicholas Clark2010-11-081-23/+21
|