This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
11 years agoAdd Wolfram Humann to AUTHORS
Jan Dubois [Sat, 14 Aug 2010 00:22:00 +0000 (17:22 -0700)]
Add Wolfram Humann to AUTHORS

11 years agomake string-append on win32 100 times faster
Wolfram Humann [Sat, 14 Aug 2010 00:20:26 +0000 (17:20 -0700)]
make string-append on win32 100 times faster

When a string grows (e.g. gets appended to), perl calls sv_grow. When
sv_grow decides that the memory currently allocated to the string is
insufficient, it calls saferealloc. Depending on whether or not perl
was compiled with 'usemymalloc' this calls realloc in either perls
internal version or on the operating system. Perl requests from
realloc just the amount of memory required for the current
operation. With 'usemymalloc' this is not a problem because it rounds
up memory allocation to a certain geometric progression anyway. When
the operating system's realloc is called, this may or may not lead to
desaster, depending on how it's implemented. On win32 it does lead to
desaster: when I loop 1000 times and each time append 1000 chars to an
initial string size of 10 million, the memory grows from 10.000e6 to
10.001e6 to 10.002e6 and so on 1000 times till it ends at 11.000e6.

11 years agoPOSIX/t/posix.t expects a certain start to Makefile.PL
Tony Cook [Fri, 13 Aug 2010 14:21:29 +0000 (00:21 +1000)]
POSIX/t/posix.t expects a certain start to Makefile.PL

6695a346 changed the start of Makefile.PL, but t/posix.t reads that to
test its read() implementation, restore enough of the original for the
test to pass.

11 years agotwo of my patches had a bad From, teach checkAUTHORs.pl about them
Tony Cook [Fri, 13 Aug 2010 13:57:52 +0000 (23:57 +1000)]
two of my patches had a bad From, teach checkAUTHORs.pl about them

I build these patches on a VM so they ended up with a bad author, stop
t/porting/authors.t from failing because of that.

11 years agomake_ext.pl populates @INC correctly, don't override it badly
Tony Cook [Wed, 21 Jul 2010 23:54:13 +0000 (09:54 +1000)]
make_ext.pl populates @INC correctly, don't override it badly

PERL5LIB is populated by make_ext.pl with paths to the modules we need
to run, don't override this with "../../lib" since that may not have
been populated yet in a parallel build.

11 years agoCwd.pm needs to be installed in lib before SDBM_File recurses. Mark the dependency
Tony Cook [Wed, 21 Jul 2010 23:48:18 +0000 (09:48 +1000)]
Cwd.pm needs to be installed in lib before SDBM_File recurses. Mark the dependency

make_ext.pl fills PERL5LIB with relative directories to the modules
needed, but this fails for SDBM_File when it recurses into
ext/SDBM_File/sdbm directory.  Revealed in parallel builds on OpenBSD.

11 years agouse charnames (); fails
Karl Williamson [Mon, 2 Aug 2010 22:45:29 +0000 (16:45 -0600)]
use charnames (); fails

If "use charnames ()" are the only usages of this pragma in a program,
it fails due to the pragma's import method not getting called.  This
fixes that.

11 years agocharnames.t: tweak amount of testing of CJK chars
Karl Williamson [Mon, 2 Aug 2010 22:42:25 +0000 (16:42 -0600)]
charnames.t: tweak amount of testing of CJK chars

Actually, this tweaks the amount of testing of characters whose names are
algorithmically determinable, most of which are CJK characters.

This patch changes the testing to test not 1% of them, but to test 1 in
each block, no matter what the block size.  We really don't need to test
many of these to be confident the algorithm is working.

It also adds some comments to clarify what happens if one tweaks the
block size.

11 years agocharnames.t: Change message to fit in 80 columns
Karl Williamson [Mon, 2 Aug 2010 22:40:28 +0000 (16:40 -0600)]
charnames.t: Change message to fit in 80 columns

This is an important message.  Better not to wrap it.

11 years agocharnames.t: Guard agains empty lines in __DATA__
Karl Williamson [Mon, 2 Aug 2010 22:36:51 +0000 (16:36 -0600)]
charnames.t: Guard agains empty lines in __DATA__

Somehow an empty line got inserted at the end of the file, and got
interpreted as 0's which caused the test for NULL to fail.  This guards
against that.

I removed the empty line, but I'm not sure git has picked that up.

11 years agocharnames.t: use srand's seed
Karl Williamson [Mon, 2 Aug 2010 21:22:39 +0000 (15:22 -0600)]
charnames.t: use srand's seed

Don't calculate our own seed

11 years agoFix untimely destruction introduced by lvalue ops [RT#67838] by returning a TEMP...
Eric Brine [Sat, 31 Jul 2010 08:56:43 +0000 (01:56 -0700)]
Fix untimely destruction introduced by lvalue ops [RT#67838] by returning a TEMP instead of using TARG. Made appropriate TODO tests live.

11 years agoTODO tests for untimely destruction introduced by lvalue ops [RT#67838]
Eric Brine [Fri, 30 Jul 2010 16:43:29 +0000 (09:43 -0700)]
TODO tests for untimely destruction introduced by lvalue ops [RT#67838]

11 years agoPure Perl lvalue subs can't return temps, even if they are magical. This holds back...
Eric Brine [Tue, 13 Jul 2010 19:56:38 +0000 (12:56 -0700)]
Pure Perl lvalue subs can't return temps, even if they are magical. This holds back a fix for RT#67838.

This commit allows PP lvalue subs to return temps with set magic
and removes TODO from tests.

11 years agoPure Perl lvalue subs can't return temps, even if they are magical. This holds back...
Eric Brine [Tue, 13 Jul 2010 19:36:55 +0000 (12:36 -0700)]
Pure Perl lvalue subs can't return temps, even if they are magical. This holds back a fix for RT#67838. Adds TODO tests.

11 years agoAdd perldiag entry for invalid version object
David Golden [Thu, 12 Aug 2010 19:01:53 +0000 (15:01 -0400)]
Add perldiag entry for invalid version object

11 years agoRemove invalid version object from diag.t exceptions
David Golden [Thu, 12 Aug 2010 19:01:34 +0000 (15:01 -0400)]
Remove invalid version object from diag.t exceptions

11 years agoRefactor porting/diag.t and improve output format
David Golden [Thu, 12 Aug 2010 17:38:53 +0000 (13:38 -0400)]
Refactor porting/diag.t and improve output format

Adds a subroutine to standardize messages variants into a form
that appears in perldiag.pod.  Standardizes "panic: ..." instead
of skipping it.

Tests files in sorted order; improves diagnostic output
format for readability; only shows pass/fail once for each
diagnostic message

11 years agoAdd perldiag entries for new version format errors
David Golden [Thu, 12 Aug 2010 17:09:04 +0000 (13:09 -0400)]
Add perldiag entries for new version format errors

Also updates porting/diag.t to standardize the
detected messages into the format used in perldiag.pod

11 years agoImprove diag.t to detect BADVERSION diagnostics
David Golden [Thu, 12 Aug 2010 16:35:36 +0000 (12:35 -0400)]
Improve diag.t to detect BADVERSION diagnostics

11 years agoAccount for GNU "i" extension when checking 'nm' output.
H.Merijn Brand [Thu, 12 Aug 2010 10:02:12 +0000 (12:02 +0200)]
Account for GNU "i" extension when checking 'nm' output.

Add the new static_inline stuff to the "other" config files too
Add the missing Glossary parts

11 years agoConvert int.t to test.pl (and hence produce better failure diagnostics).
Nicholas Clark [Thu, 12 Aug 2010 09:33:09 +0000 (10:33 +0100)]
Convert int.t to test.pl (and hence produce better failure diagnostics).

11 years agoRT #75468: readline ignores <> overloading when arg is tied
Father Chrysostomos [Wed, 11 Aug 2010 11:51:25 +0000 (21:51 +1000)]
RT #75468: readline ignores <> overloading when arg is tied

11 years ago[perl #75904] \$ prototype does not make a unary function
Father Chrysostomos [Wed, 11 Aug 2010 09:53:08 +0000 (11:53 +0200)]
[perl #75904] \$ prototype does not make a unary function

This fixes this problem :
  $ perl -le' sub foo($) { print "foo" }; foo $_, exit'
  foo
  $ perl -le' sub foo(\$) { print "foo" }; foo $_, exit'
  Too many arguments for main::foo at -e line 1, at EOF
  Execution of -e aborted due to compilation errors.

for all those prototypes:
  *
  \sigil
  \[...]
  ;$
  ;*
  ;\sigil
  ;\[...]

11 years agoop.h: Move bits around to allow for future growth
Karl Williamson [Sun, 1 Aug 2010 04:21:54 +0000 (22:21 -0600)]
op.h: Move bits around to allow for future growth

This creates an unallocated space at the shared/unshared boundary of the
data with regexp.h.  This allows any future bits that may be needed to
go into either, without affecting binary compatibility.  I chose a
number of spare bits larger than I thought we would ever need

11 years agoregexp.h: Move bits around
Karl Williamson [Sun, 1 Aug 2010 04:20:43 +0000 (22:20 -0600)]
regexp.h: Move bits around

make regen needed.

This commit moves some bits in extflags around so that all the unallocated
ones are at the boundary between the unshared portion and the portion
shared with op.h.  This allows them to be allocated in the future to go
either way, without affecting binary compatibility at that time.

The high-order bits are unaffected, but the low order ones move to fill
the gap.

11 years agoop.h, regexp.h: renumber shifts.
Karl Williamson [Sun, 1 Aug 2010 04:18:42 +0000 (22:18 -0600)]
op.h, regexp.h: renumber shifts.

This patch doesn't change any generated code.  It just changes the base
numbering of the shifts from 1 to 0.  In regexp.h the RXf_BASE_SHIFT was
changed to make sure the used bits didn't change

11 years agoop_reg_common.h: Continue refactoring
Karl Williamson [Sun, 1 Aug 2010 04:16:34 +0000 (22:16 -0600)]
op_reg_common.h: Continue refactoring

The new op_reg_common.h did not have in it all the things that made
sense for it to have, including some comment changes that I should have
made when I created it.

I also realized the the new mechanism of using shifts allowed
RXf_PMf_STD_PMMOD_SHIFT to actually control things, rather than be a
 #define that one had to remember to change if those things changed
independently.

Finally, I created a check so that adding bits without adding them to
RXf_PMf_COMPILETIME will force a compilation error.  (This came from the
school of hard knocks)

11 years agoregexp.h: Nit in comments
Karl Williamson [Sun, 1 Aug 2010 03:57:05 +0000 (21:57 -0600)]
regexp.h: Nit in comments

11 years agoop_reg_common.h: Move things around
Karl Williamson [Sat, 31 Jul 2010 20:18:03 +0000 (14:18 -0600)]
op_reg_common.h: Move things around

Moving the definitions of the duplicate variables makes it easier to
read.  Unfortunately, the values can't be in terms of the previous ones
because defsubs_h.PL doesn't pick them up.  So I've made them numeric
with a #if to make sure they don't drift off.

11 years agoop_reg_common.h: Refactor variable for safety
Karl Williamson [Sat, 31 Jul 2010 20:13:40 +0000 (14:13 -0600)]
op_reg_common.h: Refactor variable for safety

This patch changes the variable that tells how many common bits there
are to instead be +1 that value, so bits won't get reused.  A later
commit will renumber the bits in op.h and regexp.h, but for now things
are left as-is there, which means the base variables in those two files
must subtract one to compensate for the +1

11 years agoregexp.h, op.h: decouple mostly from op_reg_common.h
Karl Williamson [Sat, 31 Jul 2010 20:01:46 +0000 (14:01 -0600)]
regexp.h, op.h: decouple mostly from op_reg_common.h

This patch changes the shift bases to new ones local in the files that
are set to the common one.  Thus, there is now a single point of
coupling between in each file to the common one.

11 years agoop.h: Fix error msg
Karl Williamson [Sat, 31 Jul 2010 19:57:51 +0000 (13:57 -0600)]
op.h: Fix error msg

11 years agoregexp.h: Fix error check to use correct offset
Karl Williamson [Sat, 31 Jul 2010 19:49:27 +0000 (13:49 -0600)]
regexp.h: Fix error check to use correct offset

11 years agoperlrecharclass: Document subtlety in Unicode
Karl Williamson [Mon, 9 Aug 2010 17:35:51 +0000 (11:35 -0600)]
perlrecharclass: Document subtlety in Unicode

The documentation had failed to mention that a regex pattern in utf8
encoding forces a Unicode interpretation on a non-utf8 string.

11 years agoperlrecharclass: Fix typo
Karl Williamson [Mon, 9 Aug 2010 17:34:12 +0000 (11:34 -0600)]
perlrecharclass: Fix typo

11 years agoperlglossary: Add defn for "code point"
Karl Williamson [Mon, 9 Aug 2010 17:33:09 +0000 (11:33 -0600)]
perlglossary: Add defn for "code point"

11 years agoperlunifaq: Note: \d, \D do not have Unicode bug
Karl Williamson [Mon, 9 Aug 2010 15:29:11 +0000 (09:29 -0600)]
perlunifaq: Note: \d, \D do not have Unicode bug

11 years agoperlunicode.pod: Elaborate unicode bug for POSIX
Karl Williamson [Mon, 9 Aug 2010 14:41:29 +0000 (08:41 -0600)]
perlunicode.pod: Elaborate unicode bug for POSIX

Mention the POSIX character classes as being affected by the Unicode
bug.

11 years agoRevert "perlunicode.pod: Elaborate unicode bug for POSIX"
Rafael Garcia-Suarez [Wed, 11 Aug 2010 08:12:09 +0000 (10:12 +0200)]
Revert "perlunicode.pod: Elaborate unicode bug for POSIX"

This reverts commit d67647f5f40a7e78bffc92ff8600c67f95d3d7b0.

11 years agoperlunicode.pod: Elaborate unicode bug for POSIX
Karl Williamson [Mon, 9 Aug 2010 14:41:29 +0000 (08:41 -0600)]
perlunicode.pod: Elaborate unicode bug for POSIX

Mention the POSIX character classes as being affected by the Unicode
bug.

11 years agofeature.pm: Note unicode_strings is not complete
Karl Williamson [Mon, 9 Aug 2010 14:26:14 +0000 (08:26 -0600)]
feature.pm: Note unicode_strings is not complete

11 years agoperlrepository.pod: Elaborate -a, -m
Karl Williamson [Sun, 1 Aug 2010 18:50:38 +0000 (12:50 -0600)]
perlrepository.pod: Elaborate -a, -m

11 years agoUpdate Unicode-Collate to CPAN version 0.56
Chris 'BinGOs' Williams [Mon, 9 Aug 2010 13:50:39 +0000 (14:50 +0100)]
Update Unicode-Collate to CPAN version 0.56

  [DELTA]

  0.56  Sun Aug  8 20:24:03 2010
    - Unicode::Collate::Locale newly supports locales: eo, nb, ro, sv.
    ! renamed t/locale_{xy}.t to t/loc_{xy}.t (for safer 8.3 names)

11 years agoDefine _USE_32BIT_TIME_T for VC6 and VC7
Jan Dubois [Sat, 7 Aug 2010 00:08:38 +0000 (17:08 -0700)]
Define _USE_32BIT_TIME_T for VC6 and VC7

In VS 2005 (VC++ 8.0) Microsoft changes time_t from 32-bit to
64-bit, even in 32-bit mode.  It also provides the _USE_32BIT_TIME_T
preprocessor option to revert back to the old functionality for
backward compatibility.  We define this symbol here for older 32-bit
compilers only (which aren't using it at all) for the sole purpose
of getting it into $Config{ccflags}.  That way if someone builds
Perl itself with e.g. VC6 but later installs an XS module using VC8
the time_t types will still be compatible.

11 years agoDon't mention Activeware Perl versions
Jan Dubois [Fri, 6 Aug 2010 23:44:50 +0000 (16:44 -0700)]
Don't mention Activeware Perl versions

All Win32::* modules on CPAN now build with standard toolchain
commands; there is no need for "porting" or special build instructions
anymore.

11 years agoDrop references to obsolete MinGW 1.x (gcc 2.95)
Jan Dubois [Fri, 6 Aug 2010 23:41:55 +0000 (16:41 -0700)]
Drop references to obsolete MinGW 1.x (gcc 2.95)

There are know issues with that compiler versions, and the necessary
fixes are no longer readily available, so stop claiming this is still
a supported compiler.  Just require gcc 3.2.x or later everywhere for
MinGW support.

11 years agoPlatform name is Windows, not Win32
Jan Dubois [Fri, 6 Aug 2010 23:26:48 +0000 (16:26 -0700)]
Platform name is Windows, not Win32

Remove reference to old compilers and also use the current
name "Windows SDK" instead of the older "Platform SDK" in most
places.  There is sill lots of chance for further improvements!

11 years agoPodtidy perlrepository.pod
Leon Brocard [Tue, 3 Aug 2010 14:39:57 +0000 (16:39 +0200)]
Podtidy perlrepository.pod

11 years agoC89 doesn't allow static dynamic initialization of complete structs
H.Merijn Brand [Mon, 2 Aug 2010 15:17:24 +0000 (17:17 +0200)]
C89 doesn't allow static dynamic initialization of complete structs

Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>
11 years agoUpdated Unic0de-Collate to CPAN version 0.55
Chris 'BinGOs' Williams [Mon, 2 Aug 2010 13:56:01 +0000 (14:56 +0100)]
Updated Unic0de-Collate to CPAN version 0.55

  [DELTA]

  0.55  Sun Aug  1 21:21:23 2010
    - incorporated Unicode::Collate::Locale with some changes.
    (see http://www.xray.mpe.mpg.de/mailing-lists/perl-unicode/2004-03/msg00030.html)
    ! added t/locale*.t that uses DUCET.

  0.54  Sun Jul 25 21:37:04 2010
    - Now UCA Revision 20 (based on Unicode 5.2.0).
    - DUCET is also updated (for Unicode 5.2.0) as Collate/allkeys.txt,
      which *is required* to test this module.
    ! Please notice that allkeys.txt will be overwritten if you have had
      other allkeys.txt already.
    - U+9FC4..U+9FCB and U+2A700..U+2B734 are new CJK Unified Ideographs.
    - Many hangul jamo are assigned (affecting hangul_terminator).

    ! DUCET will be compiled when XS is used. Explicit saying
      <table => 'allkeys.txt'> (or using another table) will prevent
      this module using the compiled DUCET.

    ! added t/default.t that uses DUCET.

11 years agoClose the tempfile in caller.t
Craig A. Berry [Mon, 2 Aug 2010 03:12:38 +0000 (22:12 -0500)]
Close the tempfile in caller.t

Otherwise it will be locked when trying to run it on VMS.

11 years agoAdd tests for Tie::ExtraHash
David Cantrell [Mon, 2 Aug 2010 07:43:27 +0000 (09:43 +0200)]
Add tests for Tie::ExtraHash

11 years agoFix file name in comment
David Cantrell [Mon, 2 Aug 2010 07:35:38 +0000 (09:35 +0200)]
Fix file name in comment

11 years agoperlhack: Note existence of t/lib/warnings
Karl Williamson [Sun, 1 Aug 2010 19:01:08 +0000 (13:01 -0600)]
perlhack: Note existence of t/lib/warnings

I didn't know about it, and thus went to unnecessarily effort until this
was kindly pointed out to me.

11 years agohandy.h: Note Devel::PPPort has duplicated macros
Karl Williamson [Sun, 1 Aug 2010 18:29:54 +0000 (12:29 -0600)]
handy.h: Note Devel::PPPort has duplicated macros

If a bug is found in the handy.h macros, it may be necessary to fix the
duplicates in the cpan module.  This may require filing a bug report
there.

11 years agoclarify when HV backref is in magic
David Mitchell [Sun, 1 Aug 2010 20:39:39 +0000 (21:39 +0100)]
clarify when HV backref is in magic

Fix up the comments in and above some functions to clarify that backref
bagic for hVs may sometimes be moved back to HvAUX.

11 years agostop after first del_backref
David Mitchell [Sun, 1 Aug 2010 20:30:33 +0000 (21:30 +0100)]
stop after first del_backref

When deleting a backreference, there should be only one matching entry.
For normal builds sop after the first one; under DEBUGGING, look for more,
then assert only one found.

The previous behaviour was to unconditionally scan the whole array and
not assert that anything was found.

11 years agooptimise single backreferences
David Mitchell [Sun, 1 Aug 2010 14:18:51 +0000 (15:18 +0100)]
optimise single backreferences

Rather than creating an AV and pushing the backref onto it,
store a single backref directly in the mg_obj or xhv_backreferences
slot.

If the backref is an AV, then we skip this optimisation (although I don't
think at the moment, that an AV would ever be pointed to by some backref
magic). So the test of whether the optimisation is is in effect is whether
the thing in the slot is an AV or not.

11 years agorefactor Perl_sv_add_backref
David Mitchell [Thu, 29 Jul 2010 22:05:17 +0000 (23:05 +0100)]
refactor Perl_sv_add_backref

No functional changes, but concentrate the assigning of a new AV in a
single place, to make the next commit easier

11 years agoDEBUG_LEAKING_SCALARS: add sv_debug_parent
David Mitchell [Sun, 1 Aug 2010 12:20:15 +0000 (13:20 +0100)]
DEBUG_LEAKING_SCALARS: add sv_debug_parent

Rather than just recording whether an SV was cloned (sv->sv_debug_cloned),
record the address of the SV we were cloned from.

11 years agoChange spaces to tabs for t/op/tie_fetch_count.t in MANIFEST
George Greer [Sun, 1 Aug 2010 04:30:22 +0000 (00:30 -0400)]
Change spaces to tabs for t/op/tie_fetch_count.t in MANIFEST

11 years agoAdd t/op/tie_fetch_count.t to MANIFEST
Florian Ragwitz [Sat, 31 Jul 2010 23:07:01 +0000 (01:07 +0200)]
Add t/op/tie_fetch_count.t to MANIFEST

11 years agoMore release manager updates from 5.13.3 release notes
David Golden [Sat, 31 Jul 2010 03:48:37 +0000 (23:48 -0400)]
More release manager updates from 5.13.3 release notes

11 years agorevert epigraphs.pod note in release manager's guide
David Golden [Fri, 30 Jul 2010 23:50:33 +0000 (19:50 -0400)]
revert epigraphs.pod note in release manager's guide

11 years agoUpdate release managers guide with notes from 5.13.3 release
David Golden [Fri, 30 Jul 2010 22:00:10 +0000 (22:00 +0000)]
Update release managers guide with notes from 5.13.3 release

11 years agoImprove Porting/checkAUTHORS.pl
David Golden [Fri, 30 Jul 2010 21:57:20 +0000 (21:57 +0000)]
Improve Porting/checkAUTHORS.pl

Rationalized options and usage message.  The new "--who" option
now gives full names as provided in the AUTHORS file.

Updated t/porting/authors.t for the new option syntax.

11 years agocheckAUTHORS.pl: add --who to list unique authors
David Golden [Fri, 30 Jul 2010 20:52:28 +0000 (20:52 +0000)]
checkAUTHORS.pl: add --who to list unique authors

This will help in generating the Acknowledgements
section of perldelta using the known authors map.

11 years agoMake new tie test less noisy
Rafael Garcia-Suarez [Fri, 30 Jul 2010 12:22:33 +0000 (14:22 +0200)]
Make new tie test less noisy

11 years agoAdd new hdr op_reg_common to Makefile.SH
Karl Williamson [Thu, 29 Jul 2010 17:52:52 +0000 (11:52 -0600)]
Add new hdr op_reg_common to Makefile.SH

I believe this is required for dependencies to be calculated properly

11 years agoTests to check if FETCH of a tied variable isn't called more
Abigail [Fri, 30 Jul 2010 00:21:52 +0000 (02:21 +0200)]
Tests to check if FETCH of a tied variable isn't called more
than once. See also Bug 76814.

11 years agoPeek.t: better identify failing tests
David Mitchell [Thu, 29 Jul 2010 18:37:16 +0000 (19:37 +0100)]
Peek.t: better identify failing tests

11 years agoDump didn't display CVf_ISXSUB flag
David Mitchell [Thu, 29 Jul 2010 18:11:32 +0000 (19:11 +0100)]
Dump didn't display CVf_ISXSUB flag

11 years agoPerl_do_sv_dump didn't increase nesting for magic
David Mitchell [Thu, 29 Jul 2010 18:06:02 +0000 (19:06 +0100)]
Perl_do_sv_dump didn't increase nesting for magic

11 years agoPerl_do_sv_dump: alert when skipping elements
David Mitchell [Thu, 29 Jul 2010 17:57:11 +0000 (18:57 +0100)]
Perl_do_sv_dump: alert when skipping elements

When dumping an HV, we skip dumping the elements if the iterator is
already in use. Explain this in the dump output so people like me aren't
left wondering why the elements have vanished.

11 years agoexpand the xhv_backreferences code notes
David Mitchell [Thu, 29 Jul 2010 16:56:24 +0000 (17:56 +0100)]
expand the xhv_backreferences code notes

(so that I don't get so confused when I revisit this code in 5 years time)

11 years agore-apply some xhv_backreferences notes and stuff
David Mitchell [Thu, 29 Jul 2010 12:55:39 +0000 (13:55 +0100)]
re-apply some xhv_backreferences notes and stuff

re-apply some of the small doc fixes and a couple of minor code tweaks that
were part of the reverted commit 044d8c24fa9214cf0fe9c6fc8a44e03f3f5374d7,
but which didn't need reverting

11 years agoRevert "process xhv_backreferences early in S_hfreeentries"
David Mitchell [Thu, 29 Jul 2010 12:33:19 +0000 (13:33 +0100)]
Revert "process xhv_backreferences early in S_hfreeentries"

This reverts commit 044d8c24fa9214cf0fe9c6fc8a44e03f3f5374d7.

Conflicts:

hv.c

That commit tried to simply the xhv_backreferences processing, but
was totally wrong and broke ordinary weak refs to hashes (see #76716).

11 years agoRevert "make it an error to look for magic hv backref"
David Mitchell [Thu, 29 Jul 2010 12:23:22 +0000 (13:23 +0100)]
Revert "make it an error to look for magic hv backref"

This reverts commit 64345bb5cdba725a5e2af06c99aa36d8a1b8b873.

11 years agoHash assignment can zap weak references to the hash
Father Chrysostomos (via RT) [Sun, 25 Jul 2010 19:46:06 +0000 (12:46 -0700)]
Hash assignment can zap weak references to the hash

[perl #76716]

commits 044d8c24f and 64345bb broke backrefs to hashes that are merely
cleared or undeffed, but not freed. Spotted by Father Chrysostomos.
Test for it here (fixes coming next)

11 years agoRefactor common parts of op.h, regexp.h into new .h
Karl Williamson [Tue, 20 Jul 2010 04:26:43 +0000 (22:26 -0600)]
Refactor common parts of op.h, regexp.h into new .h

op.h and regexp.h share common elements in their data structures.  They
have had to manually be kept in sync.  This patch makes it easier by
putting those common parts into a common header #included by the two.

To do this, it seemed easiest to change the symbol definitions to use
left shifts to generate the flag bits.  But this meant that regcomp.pl
and axt/B/defsubs_h.PL had to be taught to recognize those forms of
expressions, done in separate commits

11 years agoext/B/defsubs_h.PL: teach to allow exprs with <<
Karl Williamson [Tue, 20 Jul 2010 03:51:32 +0000 (21:51 -0600)]
ext/B/defsubs_h.PL: teach to allow exprs with <<

Allow #defines which have left shift operators in them.

11 years agoregcomp.pl: Teach to handle wider range of exprs
Karl Williamson [Tue, 20 Jul 2010 03:46:49 +0000 (21:46 -0600)]
regcomp.pl: Teach to handle wider range of exprs

In particular teach it to handle definitions using <<, e.g.
    #define SYMBOL (1<<3)
and to remember previous symbol definitons in the file so that symbol
can be  used in later definitions.

11 years agoext/B/defsubs_h.PL: add explanatory comment
Karl Williamson [Mon, 19 Jul 2010 23:18:03 +0000 (17:18 -0600)]
ext/B/defsubs_h.PL: add explanatory comment

11 years agodefsubs_h.PL: Use correct variable in error msg
Karl Williamson [Mon, 19 Jul 2010 23:15:51 +0000 (17:15 -0600)]
defsubs_h.PL: Use correct variable in error msg

11 years agoregexp.h: Add some comments
Karl Williamson [Mon, 19 Jul 2010 19:06:19 +0000 (13:06 -0600)]
regexp.h: Add some comments

11 years agoop.h: Fix comments in #defines that cross lines
Karl Williamson [Mon, 19 Jul 2010 18:22:16 +0000 (12:22 -0600)]
op.h: Fix comments in #defines that cross lines

It is not good form to have comments in a #define continue onto the next
line, especially not with a \ ending each continuation line.  People
preferred that the comment be placed before the #define

11 years agoMake srand() return "0 but true" for 0, for backwards compatible behaviour.
Nicholas Clark [Wed, 28 Jul 2010 10:01:51 +0000 (11:01 +0100)]
Make srand() return "0 but true" for 0, for backwards compatible behaviour.

11 years agoAdd a test for srand's return value
Rafael Garcia-Suarez [Wed, 28 Jul 2010 08:25:47 +0000 (10:25 +0200)]
Add a test for srand's return value

11 years agosrand: change to return its seed
Karl Williamson [Tue, 27 Jul 2010 14:18:25 +0000 (08:18 -0600)]
srand: change to return its seed

This commit changes srand to to return the seed instead of always
returning 1.  The motivation behind this is to allow applications to not
have to come up with their own pseudo-random generator if they want
repeatable results.

The previous return behavior has never been documented.  Note that it is
possible, but very unlikely, for the seed to end up being 0, which means
that if someone were relying on the undocumented previous behavior of
srand returning true, that in very rare instances it would return 0,
failing, and the next time they ran it, it would succeed, possibly
leading to puzzlement and very rare unexplained failures.

11 years agoremove misleading comment about CXINC; it's fine
Chip Salzenberg [Wed, 28 Jul 2010 06:42:49 +0000 (23:42 -0700)]
remove misleading comment about CXINC; it's fine

11 years agoRevert "Fix off-by-one: avoid allocating an extra context"
Chip Salzenberg [Wed, 28 Jul 2010 06:40:56 +0000 (23:40 -0700)]
Revert "Fix off-by-one: avoid allocating an extra context"
This reverts commit 395b8e2d02eadc9b0639534410c39c530bc8a33d.
The fencepost error is coming from inside the programmer!

11 years agoFix off-by-one: avoid allocating an extra context
Chip Salzenberg [Wed, 28 Jul 2010 03:45:41 +0000 (20:45 -0700)]
Fix off-by-one: avoid allocating an extra context
(patch req by Nicholas)

11 years agoBump $ExtUtils::ParseXS::VERSION to non-dev version
Florian Ragwitz [Tue, 27 Jul 2010 12:05:42 +0000 (14:05 +0200)]
Bump $ExtUtils::ParseXS::VERSION to non-dev version

It's upstream => blead now.

11 years agoMove ExtUtils::ParseXS from cpan/ to dist/
Florian Ragwitz [Tue, 27 Jul 2010 12:02:15 +0000 (14:02 +0200)]
Move ExtUtils::ParseXS from cpan/ to dist/

Both Ken and David agree with this.

11 years agoDocument in perldelta Karl's work I just merged
Rafael Garcia-Suarez [Tue, 27 Jul 2010 08:42:29 +0000 (10:42 +0200)]
Document in perldelta Karl's work I just merged

The original branch was putting this paragraph in perl5133delta.pod.

11 years agoMerge remote branch 'khwilliamson/ncharnames' into blead
Rafael Garcia-Suarez [Tue, 27 Jul 2010 08:31:34 +0000 (10:31 +0200)]
Merge remote branch 'khwilliamson/ncharnames' into blead

Conflicts:
pod/perl5133delta.pod

11 years agoChange function signature of grok_bslash_o
Karl Williamson [Sun, 25 Jul 2010 19:13:10 +0000 (13:13 -0600)]
Change function signature of grok_bslash_o

The previous return value where NULL meant OK is outside-the-norm.

11 years agoCorrect pod in numeric.c
Karl Williamson [Sun, 25 Jul 2010 17:48:05 +0000 (11:48 -0600)]
Correct pod in numeric.c

11 years agoCorrect comment in toke.c
Karl Williamson [Sun, 25 Jul 2010 17:46:45 +0000 (11:46 -0600)]
Correct comment in toke.c