This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
13 years agoperldelta: Move the new C APIs back up to Core Enhancements
Father Chrysostomos [Tue, 15 Mar 2011 05:35:51 +0000 (22:35 -0700)]
perldelta: Move the new C APIs back up to Core Enhancements

On second thought, they seem better there. :-)

13 years agoperldelta: Consistency tweaks
Father Chrysostomos [Tue, 15 Mar 2011 05:32:35 +0000 (22:32 -0700)]
perldelta: Consistency tweaks

Consistent spelling of ‘optimi[sz]ation’ and more consistent use
of dashes.

13 years agoperldelta: Rearrange the Performance Enhancements section
Father Chrysostomos [Tue, 15 Mar 2011 05:29:29 +0000 (22:29 -0700)]
perldelta: Rearrange the Performance Enhancements section

This moves similar items closer to each other. It is somewhat subject-
ive, but basically speed optimisations are first, and then memory sav-
ings. Slight enhancements come last.

13 years agoperldelta: First pass in cleaning up Performance Enhancements
Father Chrysostomos [Tue, 15 Mar 2011 05:20:31 +0000 (22:20 -0700)]
perldelta: First pass in cleaning up Performance Enhancements

13 years agoperldelta: Some rewording of entries in Deprecations
Father Chrysostomos [Tue, 15 Mar 2011 04:33:08 +0000 (21:33 -0700)]
perldelta: Some rewording of entries in Deprecations

13 years agoperldelta: Rearrange the Deprecations section a bit
Father Chrysostomos [Tue, 15 Mar 2011 04:27:29 +0000 (21:27 -0700)]
perldelta: Rearrange the Deprecations section a bit

13 years agoperldelta: Rearrange and categorise Incompatible Changes
Father Chrysostomos [Tue, 15 Mar 2011 01:19:01 +0000 (18:19 -0700)]
perldelta: Rearrange and categorise Incompatible Changes

13 years agoperldelta: Add link from Core Enhancements to New APIs
Father Chrysostomos [Mon, 14 Mar 2011 23:50:04 +0000 (16:50 -0700)]
perldelta: Add link from Core Enhancements to New APIs

13 years agoperldelta: Some Incompatible Changes clean-up
Father Chrysostomos [Mon, 14 Mar 2011 23:36:22 +0000 (16:36 -0700)]
perldelta: Some Incompatible Changes clean-up

This rewords some sections and removes others that no longer apply
(e.g., that describe reverts of earlier 5.13 changes).

The section about blead API compatibility can go, as it does not apply
to stable releases. Anyone following blead releases should have seen
it already.

13 years agoperldelta: Add the CPAN version
Father Chrysostomos [Mon, 14 Mar 2011 21:08:44 +0000 (14:08 -0700)]
perldelta: Add the CPAN version

13 years agoperldelta: Clean up the Security section
Father Chrysostomos [Mon, 14 Mar 2011 21:06:03 +0000 (14:06 -0700)]
perldelta: Clean up the Security section

13 years agoperldelta: Reword Core Enhancements
Father Chrysostomos [Mon, 14 Mar 2011 21:02:24 +0000 (14:02 -0700)]
perldelta: Reword Core Enhancements

and cut down the size of some entries

13 years agoperldelta: Incorporate 994ae75
Father Chrysostomos [Mon, 14 Mar 2011 20:15:55 +0000 (13:15 -0700)]
perldelta: Incorporate 994ae75

13 years agoperldelta: Rearrange Core Enhancements into subsections
Father Chrysostomos [Mon, 14 Mar 2011 20:14:54 +0000 (13:14 -0700)]
perldelta: Rearrange Core Enhancements into subsections

Also delete the perl -h thing, which is not noteworthy.

And capitalise headers consistently

Some of the items now under Regular Expressions are not specific to
regexps, but that should not matter, as the point is to create a
coherent document that people can read without getting lost.

And ‘Return value of C<delete $+{...}>’ has been ousted.

13 years agoperldelta: Oust the XS-specific core enhancements
Father Chrysostomos [Mon, 14 Mar 2011 20:14:27 +0000 (13:14 -0700)]
perldelta: Oust the XS-specific core enhancements

They can go in their own section as Core Enhancements is far too big.

13 years agoperldelta: Merge some entries in Core Enhancements
Father Chrysostomos [Mon, 14 Mar 2011 20:13:05 +0000 (13:13 -0700)]
perldelta: Merge some entries in Core Enhancements

13 years agoperldelta: Oust some entries from Core Enhancements
Father Chrysostomos [Mon, 14 Mar 2011 20:12:36 +0000 (13:12 -0700)]
perldelta: Oust some entries from Core Enhancements

Some of those do not belong in there.

13 years agoperldelta: Add changes from 5.13.0
Father Chrysostomos [Mon, 14 Mar 2011 20:12:04 +0000 (13:12 -0700)]
perldelta: Add changes from 5.13.0

perl 5.13.0’s delta file was never completed. These are the miss-
ing entries.

13 years agoCombine all perl513*deltas (as of commit d24f2be2)
Father Chrysostomos [Mon, 14 Mar 2011 20:11:20 +0000 (13:11 -0700)]
Combine all perl513*deltas (as of commit d24f2be2)

(Wow! This thing is almost 5000 lines!)

13 years agoReplace perldelta.pod with the template
Father Chrysostomos [Mon, 21 Mar 2011 16:13:07 +0000 (09:13 -0700)]
Replace perldelta.pod with the template

so I can apply my commits from the perl5140delta branch (and so I
don’t have to bother learning git properly :-)

13 years agosilence "unused variable" compiler warning
Karl Williamson [Mon, 21 Mar 2011 15:07:50 +0000 (09:07 -0600)]
silence "unused variable" compiler warning

13 years agoregcomp.c: enums are tighter in C++
Karl Williamson [Mon, 21 Mar 2011 15:05:55 +0000 (09:05 -0600)]
regcomp.c: enums are tighter in C++

I was using 0 for a generic non-interesting character, which works in C
but not C++.

13 years agopack test failures with long doubles on x86/gcc
David Mitchell [Mon, 21 Mar 2011 14:14:52 +0000 (14:14 +0000)]
pack test failures with long doubles on x86/gcc

[perl #86534]

When using 80-bit extended precision floats, gcc-generated code
can sometimes copy 10 bytes and sometimes 12. This can lead to 2 random
bytes something appearing in the output of pack('F') and pack('D').

Work around this by using sv_2nv() rather than SvNV()
(which expands to (SvNOK(sv) ? SvNVX(sv) : sv_2nv(sv) )

The basic issue is that the NV return value of a function is returned
in a floating point register, which is then written to memory as 10 bytes,
whereas a direct assignment, e.g. NV nv1 = nv2, is done by a 12-byte
memory copy.

However, when the sv_2nv() function is called as part of the ?:
expression, its returned value is written as *10* bytes to a temp location
on the stack, which is then copied as a *12* byte value to its final
destination, picking up 2 bytes of random data from the stack, which then
appears in the output of pack(), and ultimately leads to a test failure.

13 years agoTry reducing the risk of blind copy-paste errors
Florian Ragwitz [Sun, 20 Mar 2011 20:40:32 +0000 (21:40 +0100)]
Try reducing the risk of blind copy-paste errors

13 years agoAt this point, there's no tag for the next release yet
Florian Ragwitz [Sun, 20 Mar 2011 20:40:08 +0000 (21:40 +0100)]
At this point, there's no tag for the next release yet

13 years agopod/buildtoc doesn't update pod.lst
Florian Ragwitz [Sun, 20 Mar 2011 20:29:10 +0000 (21:29 +0100)]
pod/buildtoc doesn't update pod.lst

13 years agoCreate a perldelta for 5.14.0
Florian Ragwitz [Sun, 20 Mar 2011 19:57:59 +0000 (20:57 +0100)]
Create a perldelta for 5.14.0

13 years agoAdd the 5.13.11 epigraph
Florian Ragwitz [Sun, 20 Mar 2011 18:47:51 +0000 (19:47 +0100)]
Add the 5.13.11 epigraph

13 years agoTrim some trailing whitespace from epigraphs.pod
Florian Ragwitz [Sun, 20 Mar 2011 18:47:34 +0000 (19:47 +0100)]
Trim some trailing whitespace from epigraphs.pod

13 years agoregex .t's: Remove now passing TODOs
Karl Williamson [Sun, 20 Mar 2011 17:57:20 +0000 (11:57 -0600)]
regex .t's: Remove now passing TODOs

13 years agoregexec.c: Rmv special code no longer needed
Karl Williamson [Sun, 20 Mar 2011 17:56:11 +0000 (11:56 -0600)]
regexec.c: Rmv special code no longer needed

The trickyness has been resolved elsewhere

13 years agoregcharclass: Add tricky fold characters.
Karl Williamson [Sun, 20 Mar 2011 01:29:17 +0000 (19:29 -0600)]
regcharclass: Add tricky fold characters.

The tricky fold characters need to be expanded to include the ones
that map to the same ones as the original set.  This isn't because the
new ones have a length issue, it's that they get left out of comparisons
because of the special regnodes generated for the tricky ones.

13 years agoregcomp.c: Remove FOLDCHAR generation
Karl Williamson [Sun, 20 Mar 2011 17:32:11 +0000 (11:32 -0600)]
regcomp.c: Remove FOLDCHAR generation

ANYOFV handles multi-char folds in ANYOF nodes, and it turns
out it is a superset of what FOLDCHAR does, which never got fully
implemented in regexec.c, whereas ANYOFV is.  FOLDCHAR may be the better
way to go in the long-term, as it takes less space and is faster, but
this gives us the functionality today, with no extra work.

FOLDCHAR had been generated only when the character in question is a
literal in the input stream, and wasn't touched for the probably more
common use of \N{} or \x, which were fixed from not doing anything
special to using ANYOFV earlier in the 5.13 series, and it turns out
that the code that does it all is in a part of the code that gets
executed anyway, so that simply removing the special FOLDCHAR code
causes execution to drop down to this code.

I'm thinking at the moment that for 5.16, ANYOV should be removed in
favor of branches, using the technique of recursion that has recently
been added to \N{}.  That would enable easier trie generation and
simplify things in regexec and the optimizer.

13 years agoregcomp.c: Use mnemonic instead of hex value
Karl Williamson [Sun, 20 Mar 2011 17:26:14 +0000 (11:26 -0600)]
regcomp.c: Use mnemonic instead of hex value

13 years agoregcomp.c: Handle inverse tricky folds
Karl Williamson [Sun, 20 Mar 2011 17:23:14 +0000 (11:23 -0600)]
regcomp.c: Handle inverse tricky folds

The tricky folds have only worked one direction.  This handles the
other, when it sees something the tricky fold folds to it converts that
to the tricky fold op.

13 years agoregcomp.c: Move opening block brace
Karl Williamson [Sun, 20 Mar 2011 17:18:17 +0000 (11:18 -0600)]
regcomp.c: Move opening block brace

This is in preparation for future commits.  The declarations don't
depend on the two code lines.

13 years agoregcomp.c: Add special case for a Unicode char
Karl Williamson [Sun, 20 Mar 2011 17:14:28 +0000 (11:14 -0600)]
regcomp.c: Add special case for a Unicode char

This failed under some circumstances

13 years agoreg_namedseq: Restructure so doesn't duplicate code
Karl Williamson [Sun, 20 Mar 2011 16:25:17 +0000 (10:25 -0600)]
reg_namedseq: Restructure so doesn't duplicate code

This routine now calls reg() recursively after converting the parse
to something the rest of the code understands.  This eliminates
duplicated code, and allows for uniform treatment of code points, as
things were getting out of sync.  It also eliminates the restrction on
how many characters a named sequence can expand to.

toke now converts its input (which is in Unicode terms) to native on
EBCDIC platforms, so the rest of the code can can continue to ignore
that.

The restriction on the length of the number of characters a named
sequence is hereby removed, because reg() handles that.

13 years agoAdd depth parameter to reg_namedseq
Karl Williamson [Sun, 20 Mar 2011 16:20:14 +0000 (10:20 -0600)]
Add depth parameter to reg_namedseq

13 years agoregcomp.c: Add element to structure
Karl Williamson [Sun, 20 Mar 2011 15:59:26 +0000 (09:59 -0600)]
regcomp.c: Add element to structure

13 years agoutf8.h: Add #define
Karl Williamson [Sun, 20 Mar 2011 15:58:44 +0000 (09:58 -0600)]
utf8.h: Add #define

13 years agoSimplify a tiny bit of the release manager guide v5.13.11
Florian Ragwitz [Sun, 20 Mar 2011 15:16:49 +0000 (16:16 +0100)]
Simplify a tiny bit of the release manager guide

13 years agoAdd 5.13.11 to perlhist
Florian Ragwitz [Sun, 20 Mar 2011 15:14:43 +0000 (16:14 +0100)]
Add 5.13.11 to perlhist

13 years agoUpdate corelist for 5.13.11
Florian Ragwitz [Sun, 20 Mar 2011 14:40:16 +0000 (15:40 +0100)]
Update corelist for 5.13.11

13 years agoAvoid warnings in pat_advanced.t in the logic for skipping a test.
Nicholas Clark [Sun, 20 Mar 2011 14:37:39 +0000 (14:37 +0000)]
Avoid warnings in pat_advanced.t in the logic for skipping a test.

Also, change the skip added in 2feceb76bc07c897 to a todo skip.

13 years agoFill the Acknowledgements section in perldelta
Florian Ragwitz [Sun, 20 Mar 2011 14:31:55 +0000 (15:31 +0100)]
Fill the Acknowledgements section in perldelta

13 years agoBump the perl version for 5.13.11
Florian Ragwitz [Wed, 9 Mar 2011 22:41:46 +0000 (23:41 +0100)]
Bump the perl version for 5.13.11

13 years agoFix a tiny pod nit in perldelta
Florian Ragwitz [Sun, 20 Mar 2011 13:58:19 +0000 (14:58 +0100)]
Fix a tiny pod nit in perldelta

13 years agoRemove empty perldelta sections
Florian Ragwitz [Sun, 20 Mar 2011 13:55:29 +0000 (14:55 +0100)]
Remove empty perldelta sections

Only the Acknowledgements section still needs filling in.

13 years agoComplete the perldelta for 5.13.11
Florian Ragwitz [Sun, 20 Mar 2011 13:49:47 +0000 (14:49 +0100)]
Complete the perldelta for 5.13.11

13 years agoSkip test in pat_advanced_thr.t as it triggers an unrelated thread bug.
Nicholas Clark [Sun, 20 Mar 2011 11:19:23 +0000 (11:19 +0000)]
Skip test in pat_advanced_thr.t as it triggers an unrelated thread bug.

13 years agoMinimise the actions of the BEGIN block in B.pm
Nicholas Clark [Sun, 20 Mar 2011 10:25:21 +0000 (10:25 +0000)]
Minimise the actions of the BEGIN block in B.pm

Retain the call to XSLoader::load() at BEGIN time, as we want the constants
loaded before the compiler meets OPf_KIDS below, as the combination of having
the constant stay a Proxy Constant Subroutine and its value being inlined
saves a little over .5K

13 years agoIn B, use typeglob aliasing instead of subref to typeglob assignment.
Nicholas Clark [Sun, 20 Mar 2011 10:03:15 +0000 (10:03 +0000)]
In B, use typeglob aliasing instead of subref to typeglob assignment.

Typeglob aliasing saves just about 1.25K, because fewer internal structures are
created. In the general case the behaviour of the two differs, but as the
only package variables of these names are subroutines, and we are within our
own namespace, there is no difference here.

13 years ago#84774: local $_ calls STORE when $_ is aliased to a tied hash element
Jan Dubois [Fri, 18 Mar 2011 22:37:20 +0000 (15:37 -0700)]
#84774: local $_ calls STORE when $_ is aliased to a tied hash element

local($_) will now strip all magic from $_, so that it is always safe
to localize $_, regardless what kind of special (or tied) variable it
may have been aliased to.

13 years agoregexec.c: Update comment
Karl Williamson [Sun, 20 Mar 2011 01:19:50 +0000 (19:19 -0600)]
regexec.c: Update comment

13 years agoregcomp.h: Add comment
Karl Williamson [Sun, 20 Mar 2011 01:18:47 +0000 (19:18 -0600)]
regcomp.h: Add comment

13 years agomktables: Include simple case foldings
Karl Williamson [Sun, 20 Mar 2011 01:11:16 +0000 (19:11 -0600)]
mktables: Include simple case foldings

F(ull) case foldings are not handled all that well in Perl.  It turns out
that a number of them have S foldings as well.  In all cases, what
matches in S is supposed to also match in F, but Perl doesn't always
know that; this adds that information.

13 years agoperlfunc: clarified 'do FILE' error checking
David Golden [Sun, 20 Mar 2011 01:55:15 +0000 (21:55 -0400)]
perlfunc: clarified 'do FILE' error checking

Partial fix for RT #80626

13 years agoperl5123delta: Improve description
Father Chrysostomos [Sun, 20 Mar 2011 01:52:35 +0000 (18:52 -0700)]
perl5123delta: Improve description

‘lvalue sub return values are now COW’ is not very clear.
I know 5.12.3 is already released, but at least for posterity’s
sake it’s nice to make this more descriptive.

13 years agoperl5122delta: typo
Father Chrysostomos [Sun, 20 Mar 2011 01:42:25 +0000 (18:42 -0700)]
perl5122delta: typo

13 years agoperl5122delta: Correct two references
Father Chrysostomos [Sun, 20 Mar 2011 00:50:31 +0000 (17:50 -0700)]
perl5122delta: Correct two references

These are CPAN tickets, not perl tickets.

13 years agoUpdated HTTP::Tiny to CPAN version 0.011
David Golden [Sun, 20 Mar 2011 00:51:48 +0000 (20:51 -0400)]
Updated HTTP::Tiny to CPAN version 0.011

[DELTA]

0.011     2011-03-19 20:48:39 America/New_York

  [BUG FIXES]

  - Made t/000_load.t less verbose under harness (RT#65507) [Dave Mitchell]

  - Removed 'Errno' as an explicit prefix (it is a core module, but not
    indexed by PAUSE, which might confuse some installers

13 years agoregcomp.c: RT#77414. Initialize flag
Karl Williamson [Sun, 20 Mar 2011 00:41:48 +0000 (18:41 -0600)]
regcomp.c: RT#77414. Initialize flag

As indicated in the comments, this flag needs to be initialized to
1 or the optimizer loses the fact that something could match a
character that isn't in utf8 and whose bitmap bit isn't set.  This
happens, for example, with Unicode properties.

Thus this fixes #77414.  That ticket had been closed recently because
it went away due to another patch that caused the optimizer to be
bypassed in the cases tested for.  But when that patch was reverted,
and cleaned-up, this bug came back.  Now, I believe I have found the
root cause.

13 years agoregcomp.c: /l uses the \w, etc. classes
Karl Williamson [Sun, 20 Mar 2011 00:37:53 +0000 (18:37 -0600)]
regcomp.c: /l uses the \w, etc. classes

For non-locale, \d, etc are compiled in with their actual code points they
match, so the class portion of the synthetic start class node is
irrelevant, and should initialized to zero to avoid confusion.  But for
locale it is highly relevant, and should be initialized to all ones, to
indicate matching anything.

13 years agoregcomp.c: Optimizer could lose some info
Karl Williamson [Sun, 20 Mar 2011 00:33:17 +0000 (18:33 -0600)]
regcomp.c: Optimizer could lose some info

When ORing two nodes together for the synthetic start class, and one
matches outside the 256-char bitmap, we currently don't know what it
matches.  In some cases it could be some or all of those 256 characters.
If so, we have to assume it's all of them.

13 years agoregcomp.c: Move statement down.
Karl Williamson [Sun, 20 Mar 2011 00:21:32 +0000 (18:21 -0600)]
regcomp.c: Move statement down.

This is in prep for another commit which needs the flags to be
untouched for some tests.

13 years agopat_advanced.t: Bump watchdog timeout
Karl Williamson [Sun, 20 Mar 2011 00:18:39 +0000 (18:18 -0600)]
pat_advanced.t: Bump watchdog timeout

When my system was at 100%, the 2 seconds wasn't enough.  I set it
to 10 seconds which is the most common value used in other .t's

13 years agoregcomp.h: Add ANYOF_CLASS_SETALL()
Karl Williamson [Sat, 19 Mar 2011 21:10:21 +0000 (15:10 -0600)]
regcomp.h: Add ANYOF_CLASS_SETALL()

This macro sets all the bits of the class (for \w, etc) for use during
initialization

13 years agoutf8.h: A fold buffer needs to hold any utf8 char
Karl Williamson [Sat, 19 Mar 2011 21:31:30 +0000 (15:31 -0600)]
utf8.h: A fold buffer needs to hold any utf8 char

It can't just be large enough to hold the Unicode subset.

13 years agoregexec.c: execute inappropriately skipped code
Karl Williamson [Sat, 19 Mar 2011 21:22:11 +0000 (15:22 -0600)]
regexec.c: execute inappropriately skipped code

The comment said that there was no use doing this in lenp was NULL,
but there is, as it sees if there is a match or not and sets the
appropriate variable.

13 years agoregexec.c: Chg var. name for clarity
Karl Williamson [Sat, 19 Mar 2011 21:19:00 +0000 (15:19 -0600)]
regexec.c: Chg var. name for clarity

13 years agoUpdate CPANPLUS to CPAN version 0.9103
Chris 'BinGOs' Williams [Sun, 20 Mar 2011 00:37:18 +0000 (00:37 +0000)]
Update CPANPLUS to CPAN version 0.9103

  [DELTA]

  Changes for 0.9103      Sun Mar 20 00:38:05 2011
  ================================================
  * Fixed the logic not sending NA reports when
    'perl' is expressed as a prereq

13 years agoMore version bumps in view of recent PERL_NO_GE_CONTEXT commits
Father Chrysostomos [Sun, 20 Mar 2011 00:39:14 +0000 (17:39 -0700)]
More version bumps in view of recent PERL_NO_GE_CONTEXT commits

13 years agoClean: Move old comment to proper location
Michael Witten [Sun, 20 Mar 2011 00:34:58 +0000 (17:34 -0700)]
Clean: Move old comment to proper location

This:

  commit 0298d7b92741692bcf2e34c418a564332bb034e6:
  Date:   Tue May 31 10:40:01 2005 +0000

      Avoid updating a variable in a loop.
      Only calculate the number of links in a hash bucket chain if we really
      need it.

      p4raw-id: //depot/perl@24648

forgot to move a large comment to its new location; this new commit
fixes that.

13 years agoDoc patch for perlsyn, clarification in given/when
Alastair Douglas [Sun, 20 Mar 2011 00:26:43 +0000 (17:26 -0700)]
Doc patch for perlsyn, clarification in given/when

I had about an hour of über confusion regarding smart matching in a
when, and when I finally clocked on to what the POD was telling me I
thought clarification would be in order. Many agreed :)

The chief change I would make is to use the word 'operands' instead of
'arguments' when referring to the ... and ..., ... && ... etc
sections; this was the major cause of my confusion. Second
clarification is that 'the test' in question is whether to use smart
matching, not the result of using smart matching!

Patch follows; please go ahead and amend as required :)

13 years agoAdd Alastair Douglas to AUTHORS
Father Chrysostomos [Sun, 20 Mar 2011 00:26:38 +0000 (17:26 -0700)]
Add Alastair Douglas to AUTHORS

13 years agoPerl_sighandler: only inc SS_ix for unsafe signals
David Mitchell [Sat, 19 Mar 2011 21:49:34 +0000 (21:49 +0000)]
Perl_sighandler: only inc SS_ix for unsafe signals

Perl_sighandler currently increments the savestack by 5
before running a signal handler, to avoid messing with a
partially completed SS push operation that's been interrupted.

This is irrelevant for safe signals, so make this action conditional on
unsafe signals only.

13 years agoIn signal handler, don't inc stack pointers
David Mitchell [Sat, 19 Mar 2011 21:29:16 +0000 (21:29 +0000)]
In signal handler, don't inc stack pointers

In Perl_sighandler, we currently increment PL_markstack_ptr and
PL_scopestack_ix.

This was added back in 1997 in the era of unsafe signals, to make them
slightly less unsafe. The idea presumably was to stop signal handlers
inadvertently corrupting the top element of each stack. However, given that
the normal method of pushing something onto those stacks is to increment
the pointer before pushing the value, I don't see how that can happen.

The downside of this is that an uninitialised or stale value can be left
in the 'hole' left on these stacks. When exiting from a signal handler via
exit(), these holes can be read and corruption occur, while stack
unwinding is taking place. The ordering of things means we can't use
SAVEDESTRUCTOR_X to undo the damage.

This commit leaves the 'PL_savestack_ix += 5', because in this case, with
unsafe signals, it *is* possible to interrupt halfway through a new set of
save data being pushed onto the stack, and it *is* possible for this to be
undone via SAVEDESTRUCTOR_X. (But it's still unsafe and half-baked.)

This fixes [perl #85206].

13 years agoAdd PERL_NO_GET_CONTEXT to NDBM_File
Nicholas Clark [Sat, 19 Mar 2011 21:20:46 +0000 (21:20 +0000)]
Add PERL_NO_GET_CONTEXT to NDBM_File

For threaded platforms, this reduces the object code size, and should slightly
reduce CPU usage.

13 years agoAdd PERL_NO_GET_CONTEXT to GDBM_File
Nicholas Clark [Sat, 19 Mar 2011 21:19:58 +0000 (21:19 +0000)]
Add PERL_NO_GET_CONTEXT to GDBM_File

For threaded platforms, this reduces the object code size, and should slightly
reduce CPU usage.

13 years agoVersion bumps for the recent PERL_NO_GET_CONTEXT commits
Father Chrysostomos [Sat, 19 Mar 2011 21:40:36 +0000 (14:40 -0700)]
Version bumps for the recent PERL_NO_GET_CONTEXT commits

13 years agoperl5121delta: #72998 was introduced earlier
Father Chrysostomos [Sat, 19 Mar 2011 19:02:14 +0000 (12:02 -0700)]
perl5121delta: #72998 was introduced earlier

13 years agoAdd PERL_NO_GET_CONTEXT to mro
Nicholas Clark [Sat, 19 Mar 2011 20:51:18 +0000 (20:51 +0000)]
Add PERL_NO_GET_CONTEXT to mro

For threaded platforms, this reduces the object code size, and should slightly
reduce CPU usage.

13 years agoAdd PERL_NO_GET_CONTEXT to attributes
Nicholas Clark [Sat, 19 Mar 2011 20:43:32 +0000 (20:43 +0000)]
Add PERL_NO_GET_CONTEXT to attributes

For threaded platforms, this reduces the object code size, and should slightly
reduce CPU usage.

13 years agoAdd PERL_NO_GET_CONTEXT to XS::Typemap
Nicholas Clark [Sat, 19 Mar 2011 20:36:38 +0000 (20:36 +0000)]
Add PERL_NO_GET_CONTEXT to XS::Typemap

For threaded platforms, this almost halves the object code size.

13 years agoAdd PERL_NO_GET_CONTEXT to Sys::Hostname
Nicholas Clark [Sat, 19 Mar 2011 20:28:55 +0000 (20:28 +0000)]
Add PERL_NO_GET_CONTEXT to Sys::Hostname

For threaded platforms, this reduces the object code size, and should slightly
reduce CPU usage.

13 years agoAdd PERL_NO_GET_CONTEXT to I18N::Langinfo
Nicholas Clark [Sat, 19 Mar 2011 20:22:08 +0000 (20:22 +0000)]
Add PERL_NO_GET_CONTEXT to I18N::Langinfo

For threaded platforms, this reduces the object code size, and should slightly
reduce CPU usage.

13 years agoAdd PERL_NO_GET_CONTEXT to Hash::Util
Nicholas Clark [Sat, 19 Mar 2011 20:15:19 +0000 (20:15 +0000)]
Add PERL_NO_GET_CONTEXT to Hash::Util

For threaded platforms, this reduces the object code size, and should slightly
reduce CPU usage.

13 years agoAdd PERL_NO_GET_CONTEXT to Hash::Util::FieldHash
Nicholas Clark [Sat, 19 Mar 2011 20:03:47 +0000 (20:03 +0000)]
Add PERL_NO_GET_CONTEXT to Hash::Util::FieldHash

For threaded platforms, this reduces the object code size, and should slight
reduce CPU usage.

13 years agoAdd PERL_NO_GET_CONTEXT to File::Glob
Nicholas Clark [Sat, 19 Mar 2011 19:40:20 +0000 (19:40 +0000)]
Add PERL_NO_GET_CONTEXT to File::Glob

For threaded platforms, this reduces the object code size, and should slightly
reduce CPU usage.

13 years agoAdd PERL_NO_GET_CONTEXT to dl_dlopen.xs
Nicholas Clark [Sat, 19 Mar 2011 19:10:42 +0000 (19:10 +0000)]
Add PERL_NO_GET_CONTEXT to dl_dlopen.xs

For threaded builds on platforms using dlopen() for dynamic loading, this
should reduce object size, and slightly reduce CPU usage when loading
extensions.

13 years agoStop hang in regex
Karl Williamson [Sat, 19 Mar 2011 20:50:46 +0000 (14:50 -0600)]
Stop hang in regex

The algorithm for mapping multi-char fold matches back to the source in
processing ANYOF nodes was defective.  This caused the regex engine to
hang on certain character combinations.  I've also added an assert to
stop instead of loop.

13 years agoreset pos and utf8 cache when de/encoding utf8 str
David Mitchell [Sat, 19 Mar 2011 19:26:49 +0000 (19:26 +0000)]
reset pos and utf8 cache when de/encoding utf8 str

When using
    utf8::upgrade
    utf8::downgrade
    utf8::encode
    utf8::decode
or the underlying C-level functions
    sv_utf8_upgrade_flags_grow
    sv_utf8_downgrade
    sv_utf8_encode
    sv_utf8_decode
and
    sv_recode_to_utf8

update the position of the pos magic, if any, and clear the utf8
length/position-mapping cache.

This fixes [perl #80190].

13 years agoFixup errno definitions for Windows
Jan Dubois [Sat, 19 Mar 2011 00:45:10 +0000 (17:45 -0700)]
Fixup errno definitions for Windows

Redefine all winsock based Exxxx error constants used in the
core: For VS2010 we don't want to use the errno.h values, and
for older compiler versions we don't have a definition anyways.

Also remove the warnings about VS2010 from README.win32, as
they should all be resolved now.

13 years agoRedefine errno values for Visual Studio 2010
Steve Hay [Sat, 19 Mar 2011 00:04:35 +0000 (17:04 -0700)]
Redefine errno values for Visual Studio 2010

Perl traditionally stores WinSock error codes (values above 10000) in
errno, with corresponding support for $! to stringify them properly.

In Visual Studio 2010 (and presumably newer Windows SDKs) Microsoft
has started to define additional errno constants in errno.h (values
between 100 and 200) with conflicting names (e.g. EWOULDBLOCK).

There are 2 ways to deal with this situation:

1) Redefine the errno.h constants back to the winsock values for
   the Errno and POSIX modules.

2) Translate the winsock error codes to the new errno constants
   in the socket implementation in win32/win32sck.c.

Solution 1) has the advantage that any existing Perl code that has
numeric error codes hard-coded in it will continue to work.

Solution 2) has the advantage that XS code using external libaries can
set errno to the new constants, and they will be handled consistently
in the Perl core.  It will however need additional support for other
compilers and runtime libraries that don't support these new error
codes.

This commit implements solution 1).

Blame attribution: the commit message is from Jan Dubois,
the actual patch was created by Steve Hay.

Signed-off-by: Jan Dubois <jand@activestate.com>
13 years ago[PATCH] [pod] improve documentation for (?(cond)yes|no)
Moritz Lenz [Sat, 19 Mar 2011 10:44:23 +0000 (10:44 +0000)]
[PATCH] [pod] improve documentation for (?(cond)yes|no)

perlre:    Include a high-level description of what it does, and what a missing
           pattern means
perlreref: Include missing look-around cases

Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
13 years agoregcomp.c: Reorder if to silence valgrind
Karl Williamson [Fri, 18 Mar 2011 16:24:04 +0000 (10:24 -0600)]
regcomp.c: Reorder if to silence valgrind

It is better to test that a pointer is in bounds before dereferencing it
even though in this case it doesn't lead to an actual error.

13 years agoregex: Fix locale regression
Karl Williamson [Fri, 18 Mar 2011 14:36:17 +0000 (08:36 -0600)]
regex: Fix locale regression

Things like \S have not been accessible to the synthetic start class
under locale matching rules.  They have been placed there, but the
start class didn't know they were there.

This patch sets ANYOF_CLASS in initializing the synthetic start class
so that downstream code knows it is a charclass_class, and removes
the code that partially allowed this bit to be shared, and which isn't
needed in 5.14, and more thought would have to go into doing it than
was reflected in the code.

I can't come up with a test case that would verify that this works,
because of general locale testing issues, except it looked at a dump of
the generated regex synthetic start class, but the dump isn't the same
thing as the real behavior, and using one is also subject to breakage if
the regex code changes in the slightest.

13 years agocharset.t: Skip locale tests depending on platform
Karl Williamson [Thu, 17 Mar 2011 19:55:35 +0000 (13:55 -0600)]
charset.t: Skip locale tests depending on platform

The locale tests in this file assume that the code points 128-255 are
not printable, etc in the C locale.  Some platforms do not conform to that
so test at the beginning for that.

13 years agoAdd perldelta entry about improved kill(9,$pid) on Windows
Jan Dubois [Thu, 17 Mar 2011 17:38:18 +0000 (10:38 -0700)]
Add perldelta entry about improved kill(9,$pid) on Windows

I'm only adding it because there was a comment at the top of
perldelta that this change was missing an entry.  I'm not
sure it has to be mentioned at all, as it is not a full fix,
just making the issue less likely to occur.