summaryrefslogtreecommitdiff
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* Standardize on use of 'capture group' over 'buffer'Karl Williamson2010-06-281-1/+1
| | | | | | Both terms 'capture group' and 'capture buffer' are used in the documentation. This patch changes most uses of the latter to the former, as they are referenced using "\g".
* Remove MacOS classic support from DynaLoader.Nicholas Clark2010-06-232-210/+3
| | | | | ExtUtils::MakeMaker removed MacOS support in 6.25, merged to blead in December 2004, so this code is vestigial, and a small maintenance penalty.
* Remove MacOS classic support from File::{Copy,DosGlob,Find,Glob,stat}.Nicholas Clark2010-06-231-2/+2
| | | | | ExtUtils::MakeMaker removed MacOS support in 6.25, merged to blead in December 2004, so this code is vestigial, and a small runtime penalty.
* Tweak the generated Errno.pm slightly. Shorter and slightly fewer ops.Nicholas Clark2010-06-231-8/+7
| | | | | | | Use our directly at the first assignment, rather than on a line by itself. Add editor readonly blocks, consistent with most other generated files. require Exporter, rather than using it with an empty import list. We don't need it at compile time.
* version bump for B::t::OptreeCheck and add to deltaMatt S Trout2010-06-211-1/+1
|
* bump versions on VMS::DCLsym, mro, Search::Dist and UNIVERSAL and delta them ↵Matt S Trout2010-06-212-2/+2
| | | | as having spelling fixes
* version bump for B::Concise and add change to deltaMatt S Trout2010-06-211-1/+1
|
* Fix list of constants to import to make this test passRafael Garcia-Suarez2010-06-181-1/+1
|
* Avoid warnings with undefined hash values [perl #74280]Rafael Garcia-Suarez2010-06-171-1/+2
|
* Add support for more TCP_ constants to SocketSalvador Fandino2010-06-152-2/+17
| | | | (plus bump version to 1.89)
* Reorder CVf_* flags to be numerically contiguous again.Nicholas Clark2010-06-091-2/+5
| | | | | The removal of CVf_ASSERTION in 584420f022db5722 and CVf_LOCKED in e95ab0c0d2aa1b35 left two gaps in the sequence of bits in use.
* Spell-check fixes in extH.Merijn Brand2010-06-073-4/+4
|
* Fix for typo in 0824d66743a706cd, in the expected output with threads.Nicholas Clark2010-05-251-1/+1
|
* add OPpDEREFed flag to avoid double mg_get()David Mitchell2010-05-252-2/+3
| | | | | | | | | | | | | The previous commit made various ops such as rv2av unconditionally do an SvGETMAGIC(). Under some circumstances this could cause a double mg_get() (and hence double FETCH etc). In particular, when the proceeding op was something like aelem with OPpDEREF, the aelem would call vivify_ref(), which would call magic. So in peep(), mark OP_RV2[SAH]V ops with the new OPpDEREFed flag if the preceding op was OPpDEREF. Then use this flag to avoid a second dose of magic. Note that RV2GV probably needs this flag too, but there weren't any spare private flag bits left for that op (I think).
* Add s///r (non-destructive substitution).David Caldwell2010-05-221-1/+2
| | | | | | | | | | | | | | | | This changes s/// so that it doesn't act destructively on its target. Instead it returns the result of the substitution (or the original string if there was no match). In addition this patch: * Adds a new warning when s///r happens in void context. * Adds a error when you try to use s///r with !~ * Makes it so constant strings can be bound to s///r with =~ * Adds documentation. * Adds some tests. * Updates various debug code so it knows about the /r flag. * Adds some new 'r' words to B::Deparse.
* SvIVX() isn't valid on SVt_REGEXPNicholas Clark2010-05-201-1/+0
|
* bump version on modules changed since 5.13.0Ricardo Signes2010-05-202-2/+2
|
* Move code to after the variable declarations.Nicholas Clark2010-05-061-2/+5
| | | | | | | Currently we only compile the top level code with "extreme warnings", so code in ext/ isn't subject to -Wdeclaration-after-statement, hence why this was missed. Now that dual life modules have been evicted from ext/, we could probably consider notching up the warnings for all code in ext/.
* bump PerlIO::scalar versionDavid Mitchell2010-05-051-1/+1
|
* RT 43789: "in memory" files don't call STOREDavid Mitchell2010-05-052-5/+89
| | | | | | | | | | | The code in PerlIO-scalar that implements the open $fh, '>' \$buffer feature did not, apart from accidentally, support get/set magic and thus tied buffers. This patch remedies that: mostly by just blindly sprinkling SvGETMAGIC/SvSETMAGIC about, rather than doing any deep analysis and understanding of the code. One main change I did was to add a PerlIOScalar_read() function, rather than rely on the default behaviour (which implements it in terms of PerlIOScalar_get_ptr() etc), since that approach had a tendency to call FETCH multiple times
* Merge remote branch 'zefram/zefram/reliable_exception' into bleadRafael Garcia-Suarez2010-05-041-5/+48
|\ | | | | | | | | Conflicts: pp_ctl.c
| * bring G_KEEPERR back to the realm of sanityZefram2010-04-231-5/+48
| | | | | | | | | | | | | | | | | | Makes the G_KEEPERR logic more consistent, and in particular make it sensibly handle non-string exceptions. An exception in a destructor is now always emitted as a warning, and never copied or merged into $@ of the surrounding context. No more clobbering exceptions being handled elsewhere, and no more double reporting. This fixes the rest of [perl #74538].
* | Make tests pass with open pragma in effectRafael Garcia-Suarez2010-05-041-22/+22
| |
* | shift; optimizationRuslan Zakirov2010-05-031-168/+148
| |
* | tries: don't allocate memory at runtimeDavid Mitchell2010-05-031-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an indirect fix for [perl #74484] Regex causing exponential runtime+mem usage The trie runtime code was doing more SAVETMPS than FREETMPS and was thus growing a large tmps stack on heavy backtracking. Rather than fixing this directly, I rewrote part of the trie code so that it no longer needs to allocate memory in S_regmatch (it still does in find_byclass()). The basic issue is that multiple branches in the trie may trigger an accept state; for example: "abcd" =~ /xyz/abcd.*X|ab.*Y|/ here, words (branches) 2 and 3 are accept states. The original approach was, at run time, to create a list of accepted word numbers and the character positions of the end of each of those words. Then run the rest of the pattern for each word in the list in turn (in word index order). This requires memory for the list to be allocated and freed. The new approach involves creating extra info at compile time; in particular, for each word, a pointer to the previous accepted word (if any) in the state tree. For example for the above pattern, part of the state tree may be q b c d 1 -> 2 -> 3 -> 4 -> 5 (#3) (#2) (e.g. at state 1, if the next char is 'a', we transition to state 2). Here, state 3 is an accept state with word #3, and 5 is an accept state with word #2. So we build a table indexed by word number, which has wordinfo[2] = 3, wordinfo[3] = 0, thus building the word chain 2->3->0. At run time we run the trie to completion, and remember the word associated with the longest accept state (word #2 above). Then by following back the chain of .prev fields, we can produce a list of all accepting words. We then iteratively find the smallest-numbered (ie LH-most) word in the chain, and run with it. On failure and backtrack, we find the next-smallest and so on. Since we are no longer recording the end-position of each word in the string, we have to recalculate this for each backtrack. We initially record the end-position of the shortest accepting word, and given that we know the length of each word, we can calculate the new position each time as an offset from that first word. Depending on unicode and folding, that calculation can be cheap or expensive. This algorithm is optimised for the typical case where there are a small number (<= 2) accepting states. This patch creates a new compile-time array, trie->wordinfo[], indexed by word number, which contains relevant info about each word. This also supersedes the old trie->newword[] array, whose function of recording "overspills" of multiple words per accept state, is now handled as part of the wordinfo[].prev chain.
* | Reduce Errno memory usage by around 55%.Nicholas Clark2010-05-021-33/+36
| | | | | | | | | | Use Proxy Constant Subroutines rather than full-fat subroutines, and simplify the implementation of the tied hash methods.
* | Remove unused %errno and $AUTOLOAD from the generated Errno.pmNicholas Clark2010-05-021-1/+1
| |
* | Remove the lexical $len and associated calculation, which is never used.Nicholas Clark2010-05-011-3/+1
| |
* | Don't use a C++ keyword as a variable name ("new").Nicholas Clark2010-04-301-7/+7
| |
* | Regression tests for the ptr_table_* API.Nicholas Clark2010-04-293-0/+87
| |
* | remove Perl_pmflagRobin Barker2010-04-263-48/+4
| |
* | In Socket.xs, convert 3 croak()s to use %s and a constant string for the name.Nicholas Clark2010-04-241-3/+4
|/ | | | | This actually saves space, because xsubpp has to use each XS function's full name as a constant string to pass to newXS(), so any re-use of it is free.
* Bump version due to d97c33b505dd45c052a8bf42014917701b4502a5Leon Brocard2010-04-191-1/+1
|
* Bump version due to 255fdf19250671082618dae106a246f12379dbe6Leon Brocard2010-04-191-1/+1
|
* [PATCH] [5.12] Allow build on aix 4.2 (sigaction and IPv6)H.Merijn Brand2010-04-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on a patch by AUGUSTE-ETIENNE José <jose.auguste-etienne@cgss-guyane.fr> The attached patches are necessary to work around aix 4.2 lack of support for IPv6, and limited support for POSIX sigaction() The hints/aix_4.sh patch solves the following build failure: "Socket.xs", line 468.16: 1506-007 (S) "struct in6_addr" is undefined. The ext/POSIX/t/sigaction.t patch solves the failing test reported a looong time ago: http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-01/msg01124.html After testing a simple C program using POSIX sigaction() with SA_SIGINFO, I found that it worked on aix 4.3 but failed on aix 4.2. I think it's safe to skip the SA_SIGINFO test on the aix 4.2 platform. perl 5.12.0 builds fine on the following platforms / C compiler : aix 4.2.1 / vac 5.0.2.7 (with attached patches) aix 4.3.2 / gcc 2.95.3 aix 4.3.3 / vac 4.4.0.3 aix 4.3.3 / vac 5.0.28 aix 5.2 / GNUpro gcc 2.9.aix51.020209 The atatched patches should be applied to blead and maint.
* Bump $VERSION of IPC::Open3 to 1.06Rafael Garcia-Suarez2010-04-151-1/+1
|
* open3 errors in child croak parent RT#72016Eric Brine2010-04-152-57/+99
| | | | Errors in open3 no longer appear to originate from the executed command on forking systems.
* Add TODO test for RT#72016Eric Brine2010-04-151-1/+23
|
* [perl #74006] 5.12.0-RC stuffing bugZefram2010-04-142-1/+46
| | | | | | | There's a small bug in lex_stuff_pvn() that causes spurious syntax errors in an obscure situation. It happens if stuffing is performed on the last line of a file, and the line ends with a statement that lacks its terminating semicolon. Attached patch fixes and adds test.
* Merge commit 'origin/davem/post-5.12' into bleadDavid Mitchell2010-04-132-2/+10
|\
| * create SV leak test infrastructureDavid Mitchell2010-04-112-2/+10
| | | | | | | | | | | | | | Add an sv_count() function to XS::APItest to allow access to PL_sv_count, then add new test file t/op/svleak.t that allows you yo run a code fragment a few times and test whether the number of allocated SVs has increased
* | Downgrade Socket.pm's new inet_ntop and inet_pton to EXPORT_OK ratherJesse Vincent2010-03-252-3/+9
| | | | | | | | | | than EXPORT as they're new functions which clobber symbols in downstream CPAN modules.
* | Check that sparse files hold at least a block (bug in eCryptfs: ↵Leon Brocard2010-03-241-1/+2
|/ | | | https://bugs.launchpad.net/ecryptfs/+bug/390833)
* Fix an example for LC_COLLATE in POSIX.pod that actually sets LC_ALLVincent Pit2010-03-031-1/+1
| | | | Spotted by Olivier Raginel.
* stop skipping ext/Fcntl/t/syslfs.tDavid Mitchell2010-02-211-1/+7
| | | | | | | | Since the module reorganisation and now that tests run cd'ed to ext/Fcntl, expecting to run ../perl no longer works. Also, for the benefit of future generations, make the inability to find perl a failure rather than a skip, with a more relevant error message.
* Make the new Socket implementation of inet_pton consistent with the existing ↵Jesse Vincent2010-02-172-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Socket6 implementation of inet_pton. Fix for release-blocking ticket [perl #72884] > |https://rt.cpan.org/Ticket/Display.html?id=52497|4411113f|NJH/IO-Socket-Multicast6-0.03.tar.gz | I'll describe what's happening here, and leave it to everyone else to decide which of the interacting events is the bug, or where the fix might be. So the *entire* change is this: commit 4411113f31b3f00171bb335092b02104d29d7cd7 Author: Rafael Garcia-Suarez <rgarciasuarez@gmail.com> Date: Fri Mar 27 13:19:16 2009 +0100 Add inet_pton and inet_ntop to the list of functions exported by Socket diff --git a/ext/Socket/Socket.pm b/ext/Socket/Socket.pm index 6b268ef..7d130ba 100644 --- a/ext/Socket/Socket.pm +++ b/ext/Socket/Socket.pm @@ -198,6 +198,7 @@ use XSLoader (); @ISA = qw(Exporter); @EXPORT = qw( inet_aton inet_ntoa + inet_pton inet_ntop sockaddr_family pack_sockaddr_in unpack_sockaddr_in pack_sockaddr_un unpack_sockaddr_un and test fails like this: $ /home/nick/Sandpit/snap5.9.x-v5.11.4-85-g95c9bfa/bin/perl5.11.4 -Mblib t/35mcastsend.t 1..11 Constant subroutine IO::Socket::Multicast6::AF_INET6 redefined at /home/nick/Sandpit/snap5.9.x-v5.11.4-85-g95c9bfa/lib/perl5/5.11.4/Exporter.pm line 64. at /home/nick/.cpan/build/IO-Socket-Multicast6-0.03-CqGAYT/blib/lib/IO/Socket/Multicast6.pm line 10 Prototype mismatch: sub IO::Socket::Multicast6::AF_INET6 () vs none at /home/nick/Sandpit/snap5.9.x-v5.11.4-85-g95c9bfa/lib/perl5/5.11.4/Exporter.pm line 64. at /home/nick/.cpan/build/IO-Socket-Multicast6-0.03-CqGAYT/blib/lib/IO/Socket/Multicast6.pm line 10 Constant subroutine IO::Socket::Multicast6::PF_INET6 redefined at /home/nick/Sandpit/snap5.9.x-v5.11.4-85-g95c9bfa/lib/perl5/5.11.4/Exporter.pm line 64. at /home/nick/.cpan/build/IO-Socket-Multicast6-0.03-CqGAYT/blib/lib/IO/Socket/Multicast6.pm line 10 Prototype mismatch: sub IO::Socket::Multicast6::PF_INET6 () vs none at /home/nick/Sandpit/snap5.9.x-v5.11.4-85-g95c9bfa/lib/perl5/5.11.4/Exporter.pm line 64. at /home/nick/.cpan/build/IO-Socket-Multicast6-0.03-CqGAYT/blib/lib/IO/Socket/Multicast6.pm line 10 ok 1 - use IO::Socket::Multicast6; ok 2 - Create IPv4 multicast socket ok 3 - Combined IPv4 destination address and port ok 4 - Separate IPv4 destination address and port Bad arg length for Socket::pack_sockaddr_in, length is 16, should be 4 at t/35mcastsend.t line 26. The warnings aren't actually really relevant. The "problem"s are: IO::Socket::Multicast6 isa IO::Socket::INET6 IO::Socket::INET6 isa IO::Socket so they chose to inherit all behaviour from IO::Socket. In turn IO::Socket isa IO::Handle isa Exporter. IO::Socket chooses to export everything that Socket does: sub import { my $pkg = shift; if (@_ && $_[0] eq 'sockatmark') { # not very extensible but for now, fast Exporter::export_to_level('IO::Socket', 1, $pkg, 'sockatmark'); } else { my $callpkg = caller; Exporter::export 'Socket', $callpkg, @_; } } So, this means that all those choices and delegation of behaviour (and responsibility) means that all those modules export whatever Socket exports. OO modules. So, now they also export inet_pton and inet_ntop. The test is careful to only import what it needs: use strict; use Socket6 qw/ inet_pton pack_sockaddr_in6/; use Socket qw/ pack_sockaddr_in /; use Test::More tests => 11; in particular, it wants inet_pton from Socket6, and only pack_sockaddr_in from Socket. So at that point, main::inet_pton is Socket6::inet_pton Then it does this, correctly in a BEGIN block: BEGIN { use_ok( 'IO::Socket::Multicast6' ); } The side effect of this is to import all exports from IO::Socket::Multicast6. Which, from the above chain of inheritance, is @Socket::EXPORT. So at this point, main::inet_pton is rebound to Socket::inet_pton And the test fails, because they differ, and it expected (and wanted) Socket6::inet_pton(). Socket6::inet_pton() returns 4 bytes for AF_INET, 16 bytes for AF_INET6. Socket::inet_pton() returns 16 for both. Socket::pack_sockaddr_in() wants 4 bytes. Now, to add to the fun: use IO::Socket::Multicast6 (); and use IO::Socket::Multicast6; of course mean different things. The former suppresses all exports. It turns out that with Test::More::isa_ok() has no way of doing the former: $ cat use_ok.pl use warnings; use strict; use Test::More tests => 3; package clash; BEGIN { main::use_ok 'Socket' }; package crunch; BEGIN { main::use_ok 'Socket', () }; package biff; BEGIN { main::use_ok 'Socket', 'sockaddr_family' }; package main; sub dump_lowercase_keys { my $package = shift; print "For package $package:\n"; no strict 'refs'; print " $_\n" foreach sort grep {!tr/A-Z//} keys %{"${package}::"}; print "\n"; } dump_lowercase_keys $_ foreach qw (clash crunch biff); __END__ $ perl use_ok.pl 1..3 ok 1 - use Socket; ok 2 - use Socket; ok 3 - use Socket; For package clash: inet_aton inet_ntoa pack_sockaddr_in pack_sockaddr_un sockaddr_family sockaddr_in sockaddr_un unpack_sockaddr_in unpack_sockaddr_un For package crunch: inet_aton inet_ntoa pack_sockaddr_in pack_sockaddr_un sockaddr_family sockaddr_in sockaddr_un unpack_sockaddr_in unpack_sockaddr_un For package biff: sockaddr_family So, there's no clean way to rewrite that test with use_ok to suppress imports. So, to summarise, it's due to A cascade of modules blindly exporting everything that Socket exports Socket::inet_pton() and Socket6::inet_pton() differing in behaviour A test that fails to realise that it's importing everything via use_ok This one ranks as blocker because: Socket::inet_pton() and Socket::inet_ntop() are not in any stable release Hence we have the option to change them if we do it *NOW*. I think that the right fix is the appended patch. This makes the new Socket implementation of inet_pton consistent with the existing Socket6 implementation of inet_pton.
* Fix for non-regexps being upgraded to SVt_REGEXPNicholas Clark2010-02-091-1/+1
| | | | | | | | | | | | | | $ ./perl -lwe '$a = ${qr//}; $a = 2; print re::is_regexp(\$a)' 1 It is possible for arbitrary SVs (eg PAD entries) to be upgraded to SVt_REGEXP. (This is new with first class regexps) Whilst the example above does not SEGV, it will be possible to write code that will cause SEGVs (or worse) at the point when the scalar is freed, because the code in sv_clear() assumes that all scalars of type SVt_REGEXP *are* regexps, and passes them to pregfree2(), which assumes that pointers within are valid.
* Improvements to 31c9a3 - CPAN code did depend on the previous behaviour of ↵Nicholas Clark2010-02-061-1/+1
| | | | | | | | | | | | | | | | | | | blessing filehandles into FileHandle It turns out that it's not quite as simple as blessing into IO::File. If you do (just) that, then it breaks any existing code that does C<require IO::Handle;> to allow it to call methods on file handles, because they're blessed into IO::File, which isn't loaded. (Note this code doesn't assume that methods in IO::Seekable are there to be called) So, it all should work if you also set @IO::File:::ISA correctly? That way, code that assumes that methods from IO::Handle can be called will work. However, gv.c now starts complaining (but not failing) if IO::Handle, IO::Seekable and Exporter aren't present, because it goes looking for methods in them. So the solution seems to be to set @IO::File::ISA *and* create (empty) stashes for the other 3 packages. Patch appended, but not applied.
* bump versions for core libs changed since 5.11.3Ricardo Signes2010-01-192-2/+2
|
* [perl #71676] GDBM_File support on Win32kmx2010-01-181-0/+1
| | | | | | | | | | | Date: Thu, 07 Jan 2010 00:36:25 -0800 Message-ID: <rt-3.6.HEAD-1505-1262853384-1207.71676-15-0@perl.org> Tweaked as suggested in: From: "H.Merijn Brand" <h.m.brand@xs4all.nl> Date: Fri, 8 Jan 2010 13:35:17 +0100 Message-ID: <20100108133517.1f2916d3@pc09.procura.nl>