perl.git
10 years agomove subs from bottom to top, and add a vim and shebang line
Yves Orton [Thu, 1 Jan 2009 17:19:33 +0000 (18:19 +0100)] 
move subs from bottom to top, and add a vim and shebang line

10 years agovarious changes
Yves Orton [Thu, 1 Jan 2009 17:05:53 +0000 (18:05 +0100)] 
various changes

10 years agoAlmost a literal conversion of make_patchnum.sh
Kenichi Ishigaki [Thu, 1 Jan 2009 16:41:06 +0000 (17:41 +0100)] 
Almost a literal conversion of make_patchnum.sh

10 years agoprepare for refactoring to perl
Yves Orton [Thu, 1 Jan 2009 16:37:52 +0000 (17:37 +0100)] 
prepare for refactoring to perl

10 years agomodified make_patchnum.sh script
Yves Orton [Thu, 1 Jan 2009 16:36:35 +0000 (17:36 +0100)] 
modified make_patchnum.sh script

10 years agobump ExtUtils/MM.pm version number after change 34630 (add Haiku port)
David Mitchell [Sun, 4 Jan 2009 21:41:17 +0000 (21:41 +0000)] 
bump ExtUtils/MM.pm version number after change 34630 (add Haiku port)

10 years agobump Errno version number after change 34630 (add Haiku port)
David Mitchell [Sun, 4 Jan 2009 20:54:56 +0000 (20:54 +0000)] 
bump Errno version number after change 34630 (add Haiku port)

10 years agoAnother regexp failure with utf8-flagged string and byte-flagged pattern (reminder)
Slaven Rezic [Sun, 4 Jan 2009 16:28:33 +0000 (17:28 +0100)] 
Another regexp failure with utf8-flagged string and byte-flagged pattern (reminder)

Date: 17 Nov 2007 16:29:29 +0100
Message-ID: <87r6iohova.fsf@biokovo-amd64.herceg.de>

10 years agomake Dumper.xs work with 5.10.x
David Mitchell [Sun, 4 Jan 2009 00:19:00 +0000 (00:19 +0000)] 
make Dumper.xs work with 5.10.x

10 years agoRemove duplicate return in S_mro_get_linear_isa_c3() accidentally added by
Nicholas Clark [Sat, 3 Jan 2009 18:06:25 +0000 (18:06 +0000)] 
Remove duplicate return in S_mro_get_linear_isa_c3() accidentally added by
fa60396f123333e92849ecaecffb9252458d6678

10 years agoMerge branch 'blead' of camel:/gitroot/perl into blead
Rafael Garcia-Suarez [Sat, 3 Jan 2009 18:12:18 +0000 (19:12 +0100)] 
Merge branch 'blead' of camel:/gitroot/perl into blead

10 years agoChanging get_isa_hash() to static means that it needs to be wrapped in
Nicholas Clark [Sat, 3 Jan 2009 18:04:17 +0000 (18:04 +0000)] 
Changing get_isa_hash() to static means that it needs to be wrapped in
an #if defined(PERL_IN_UNIVERSAL_C).

10 years agoMerge branch 'schwern/y2038' into blead
Rafael Garcia-Suarez [Sat, 3 Jan 2009 17:55:29 +0000 (18:55 +0100)] 
Merge branch 'schwern/y2038' into blead

Conflicts:

lib/Time/Local.pm
lib/Time/Local.t
reentr.h

10 years agoUpdate from y2038
Michael G. Schwern [Tue, 7 Oct 2008 20:17:10 +0000 (16:17 -0400)] 
Update from y2038

Fix trailing #endif.

Remove C99 macro.

10 years agoApply bleadperl@34470 by hand while waiting for the git master to catch up.
Michael G. Schwern [Tue, 7 Oct 2008 13:20:46 +0000 (09:20 -0400)] 
Apply bleadperl@34470 by hand while waiting for the git master to catch up.

10 years agoTurn quads on in the VC configurations.
Michael G. Schwern [Sat, 4 Oct 2008 22:47:50 +0000 (18:47 -0400)] 
Turn quads on in the VC configurations.

10 years agoUpdate from y2038.
Michael G. Schwern [Sat, 4 Oct 2008 22:24:54 +0000 (18:24 -0400)] 
Update from y2038.

Add trace code.

Fix implied negative time in localtie64_r().  This fixes Windows.

Put in some more tests around small negative and positive times to
try and catch the above.

Explain the loss of accuracy due to use of doubles in perlport.

10 years agoUpdate from y2038
Michael G. Schwern [Sat, 4 Oct 2008 19:12:50 +0000 (15:12 -0400)] 
Update from y2038

Configuration information split out into its own header.

Added files to MANIFEST

Turn off USE_SYSTEM_GMTIME, ours is more reliable and possibly faster.

Fix type warnings found on Windows.

Remove unnecessary use of floor() and ceil().

10 years agoFix gmtime() and localtime() so they can pop times larger than 2**55 off the stack...
Michael G. Schwern [Fri, 3 Oct 2008 20:05:10 +0000 (16:05 -0400)] 
Fix gmtime() and localtime() so they can pop times larger than 2**55 off the stack. Neither POPn nor SvNVx work when casted to (Time64_T). Had to use a double and then cast.

Also POPq uses an SvIV so that's no good.

This causes an unfortunate loss in accuracy near 2**63 up to 8 minutes.

%lld is broken, it uses regular integers.  Need to use doubles and %.0f
instead, again losing accuracy.

Now things can go out to 2**63-512.

10 years agoWe are no longer bound by the limits of the tm struct.
Michael G. Schwern [Fri, 3 Oct 2008 20:04:53 +0000 (16:04 -0400)] 
We are no longer bound by the limits of the tm struct.

10 years agoFix pulling a large time off the stack by using a real double. What I really need...
Michael G. Schwern [Thu, 2 Oct 2008 21:30:26 +0000 (17:30 -0400)] 
Fix pulling a large time off the stack by using a real double. What I really need is SvQV.

Fix list context with large years.

List context can now go to 2**63-513.  I don't know why that's not 2**63-1
but I'll take it.  Maybe double imprecision.

Scalar context with large years still busted.  It appears to be something
inside Perl_newSVpvf().

10 years agoRemove the AIX work around code. Instead it should just set it's LOCALTIME_MAX to...
Michael G. Schwern [Thu, 2 Oct 2008 20:18:54 +0000 (16:18 -0400)] 
Remove the AIX work around code. Instead it should just set it's LOCALTIME_MAX to 0x7fff573e.

Update from y2038.

Use the new TM64 struct so years can go out past y2**31

Defines a Year type to avoid converting years to ints.

Remove the TIMGM work around code, using timegm64() is fine and it
saves us from having to convert from TM to tm.

Make functions private with static rather than the _foo convention.

Even faster for distant dates.

10 years agoRename localtime64.[ch] to time64.[ch] to mirror change in y2038, and the file isn...
Michael G. Schwern [Mon, 29 Sep 2008 19:55:17 +0000 (15:55 -0400)] 
Rename localtime64.[ch] to time64.[ch] to mirror change in y2038, and the file isn't about just localtime() anymore.

10 years agoEverything should now work with negative times, so let's pull out all the skips from...
Michael G. Schwern [Mon, 29 Sep 2008 16:07:29 +0000 (12:07 -0400)] 
Everything should now work with negative times, so let's pull out all the skips from the tests.

10 years agoUpdate some docs to explain that Perl no longer has a 2038 bug.
Michael G. Schwern [Mon, 29 Sep 2008 15:44:44 +0000 (11:44 -0400)] 
Update some docs to explain that Perl no longer has a 2038 bug.

10 years agoUpdate from y2038
Michael G. Schwern [Mon, 29 Sep 2008 15:05:17 +0000 (11:05 -0400)] 
Update from y2038

Work around a system that doesn't have gm/localtime_r().  This replaces Perl's
own gm/localtime() wrapper which couldn't be called outside a PP anyway
because it needs my_perl.

10 years agoUpdate from y2038
Michael G. Schwern [Sat, 27 Sep 2008 19:43:22 +0000 (15:43 -0400)] 
Update from y2038

Fix a bug in the code to use the system gmtime, it was using localtime.

Define a Year type to avoid mixing years and ints unintentionally.

Do some explicit casting to prop up compilers that don't understand
X % Y can never be larger than Y.

10 years agoFix the test plan on gmtime
Michael G. Schwern [Tue, 23 Sep 2008 17:50:16 +0000 (10:50 -0700)] 
Fix the test plan on gmtime

Use the new LOCALTIME_MIN/MAX constants.

Use the system gmtime, it'll probably be faster... maybe.

10 years agoWe are no longer slaves to the vagaries of time_t.
Michael G. Schwern [Fri, 19 Sep 2008 21:46:48 +0000 (14:46 -0700)] 
We are no longer slaves to the vagaries of time_t.

10 years agoUpdate from y2038 project.
Michael G Schwern [Tue, 16 Sep 2008 02:28:06 +0000 (19:28 -0700)] 
Update from y2038 project.

Fix localtime() handling of xx01 and -xx99 years.  That is, years just after
a non-leap exceptional century.

10 years agoUpdate from y2038
Michael G Schwern [Mon, 15 Sep 2008 04:30:59 +0000 (21:30 -0700)] 
Update from y2038

Fix localtime() for negative real years (ie. Year -208)

10 years agoPull in changes from y2038
Michael G Schwern [Mon, 15 Sep 2008 01:29:27 +0000 (18:29 -0700)] 
Pull in changes from y2038

Fix localtime() for negative dates.

10 years agoUpdate from y2038 project.
Michael G Schwern [Sun, 14 Sep 2008 22:26:16 +0000 (15:26 -0700)] 
Update from y2038 project.

Fix localtime64's over and underflow handling.

10 years agoFix the overflow warning to just check for an error.
Michael G Schwern [Sun, 14 Sep 2008 21:57:07 +0000 (14:57 -0700)] 
Fix the overflow warning to just check for an error.

Fix the overflow warning to identify the right op.

10 years agoUpdate from y2038.
Michael G Schwern [Sun, 14 Sep 2008 21:50:38 +0000 (14:50 -0700)] 
Update from y2038.

Fix the logic when to use the system functions to include the min check.

-2147483648 was throwing a warning.  -2147483647 does not.

10 years agoWrite down the logic behind the localtime vs gmtime date ranges.
Michael G Schwern [Sun, 14 Sep 2008 02:40:58 +0000 (19:40 -0700)] 
Write down the logic behind the localtime vs gmtime date ranges.

10 years agoCleaning up the Time::gmtime and Time::localtime tests and make them go past 2038.
Michael G Schwern [Sun, 14 Sep 2008 02:26:38 +0000 (19:26 -0700)] 
Cleaning up the Time::gmtime and Time::localtime tests and make them go past 2038.

I'm a little nervous about assuming negative times are going to work with
localtime(), but gmtime() is safe.

10 years agoChange the way the check_tm assertion function is compiled out by wrapping them in...
Michael G Schwern [Sat, 13 Sep 2008 13:13:41 +0000 (06:13 -0700)] 
Change the way the check_tm assertion function is compiled out by wrapping them in assert calls. This jives better with the way perl turns off asserts.

Put the localtime64.h include back.  We need the typedefs.

10 years agoRemove all of localtime64's own includes. Perl's already done that and we're loading...
Michael G Schwern [Sat, 13 Sep 2008 12:58:09 +0000 (05:58 -0700)] 
Remove all of localtime64's own includes. Perl's already done that and we're loading assert.h, accidentally turning on asserts when perl.h wants them off.

10 years agoUpdate from the latest y2038.
Michael G Schwern [Sat, 13 Sep 2008 11:26:47 +0000 (04:26 -0700)] 
Update from the latest y2038.

Include the ability to use the system functions.  This speeds up localtime()
several times when the time is < 32 bits.

Don't bother using the system gmtime() as it will probably just have bugs.
We need to wait for config to give us LOCALTIME_MIN/MAX but I think assuming
time_t is at least 32 bits is good enough for now.

This restores the full performance of localtime() for < 32 bit numbers
and gmtime() is now only 10% slower.

10 years agoUpdate to the latest version of the y2038 code.
Michael G Schwern [Sat, 13 Sep 2008 10:01:53 +0000 (03:01 -0700)] 
Update to the latest version of the y2038 code.

In this update...

* Replace unportable "long" with Quad_t
* Improve performance for current and future dates.
* Provide a version of timegm() if its not available.
* Wrap the use of EOVERFLOW in case its not portable.

This should address all known portabilty issues.

10 years agoPatch in a 64 bit clean gmtime_r() and localtime_r() from the y2038 project. http...
Michael G Schwern [Sat, 13 Sep 2008 00:18:02 +0000 (17:18 -0700)] 
Patch in a 64 bit clean gmtime_r() and localtime_r() from the y2038 project. y2038.googlecode.com/ so Perl is no longer subject to the y2038 bug.

Use Quad_t for our 64 bit time_t replacement.

Temporarily through out the "broken localtime work around".  That will
have to be integrated into localtime64_r().

Fix Time::Local to handle the new expanded date range.  "use integer" had
to go as it pegged scalars to 32 bit integers which aren't large enough
to hold the new time range.

There are probably portability issues.  timegm, for example, is not portable.
Also the assumption that "long" is 64 bits is probably wrong.

10 years agoadd -d option to Porting/cmpVERSION.pl to display diffs
David Mitchell [Sat, 3 Jan 2009 14:19:00 +0000 (14:19 +0000)] 
add -d option to Porting/cmpVERSION.pl to display diffs

10 years agosome more Porting/ script documentation
David Mitchell [Sat, 3 Jan 2009 13:51:28 +0000 (13:51 +0000)] 
some more Porting/ script documentation

10 years agoAdd some basic decriptions and/or usage info to some Porting/ scripts
David Mitchell [Sat, 3 Jan 2009 13:38:16 +0000 (13:38 +0000)] 
Add some basic decriptions and/or usage info to some Porting/ scripts

10 years agoget_isa_hash() is only used in S_isa_lookup(), so it can be static. Also, it has
Nicholas Clark [Sat, 3 Jan 2009 10:38:28 +0000 (10:38 +0000)] 
get_isa_hash() is only used in S_isa_lookup(), so it can be static. Also, it has
never been in a released version of perl, so this change has no compatibility
implications.

10 years agoFollowing change 34356, which decoupled get_isa_hash() from
Nicholas Clark [Sat, 3 Jan 2009 10:23:16 +0000 (10:23 +0000)] 
Following change 34356, which decoupled get_isa_hash() from
S_mro_get_linear_isa_dfs(), we can move get_isa_hash() to any other source file.

10 years agoFix a thinko in regression test for [perl #54956]
Ben Morrow [Sat, 3 Jan 2009 08:23:32 +0000 (09:23 +0100)] 
Fix a thinko in regression test for [perl #54956]

(follows to commit 8c8eee8276dbc780932b841fe5183943a7117a3d)

10 years agoSubject: [PATCH] Update autodie to 1.998
Paul Fenwick [Sat, 3 Jan 2009 01:17:32 +0000 (19:17 -0600)] 
Subject: [PATCH] Update autodie to 1.998
From: Paul Fenwick <pjf@perltraining.com.au>
Date: Sat, 03 Jan 2009 11:32:59 +1100
Message-ID: <495EB23B.6080504@perltraining.com.au>

10 years agoa test for Paul Evan's qr leak
Yuval Kogman [Fri, 15 Aug 2008 13:59:15 +0000 (16:59 +0300)] 
a test for Paul Evan's qr leak

10 years ago[perl #61392] Method call documentation in perlobj.pod
ian.goodacre@xtra.co.nz (via RT) [Fri, 2 Jan 2009 13:36:54 +0000 (14:36 +0100)] 
[perl #61392] Method call documentation in perlobj.pod

10 years agoMore comprehensive smartmatch.t, supersedes smobj.t
Yuval Kogman [Sat, 28 Jun 2008 22:40:36 +0000 (01:40 +0300)] 
More comprehensive smartmatch.t, supersedes smobj.t

10 years agoadd eval and error support to the t/op/smartmatch.t test
Yuval Kogman [Sat, 28 Jun 2008 22:40:35 +0000 (01:40 +0300)] 
add eval and error support to the t/op/smartmatch.t test

10 years agoadd undef tests to t/op/smartmatch.t
Yuval Kogman [Sat, 28 Jun 2008 22:40:34 +0000 (01:40 +0300)] 
add undef tests to t/op/smartmatch.t

10 years agoMinimal mention of overloading.pm in overload.pm
Paul Fenwick [Fri, 2 Jan 2009 11:26:29 +0000 (12:26 +0100)] 
Minimal mention of overloading.pm in overload.pm

10 years agoIn amagic_call(), offset should be strictly lesser than the SV len to be allowed...
Vincent Pit [Fri, 2 Jan 2009 11:24:44 +0000 (12:24 +0100)] 
In amagic_call(), offset should be strictly lesser than the SV len to be allowed to access the corresponding string buffer byte

10 years agoMerge branch 'failing-test-for-overloading-pragma' into blead
Rafael Garcia-Suarez [Fri, 2 Jan 2009 11:08:13 +0000 (12:08 +0100)] 
Merge branch 'failing-test-for-overloading-pragma' into blead

10 years agoAdd a new test for overloading.pm
Rafael Garcia-Suarez [Fri, 2 Jan 2009 11:05:59 +0000 (12:05 +0100)] 
Add a new test for overloading.pm

This one overloads "cos", which is currently at the end of the
overload table, so we properly test the bitstring stored in %^H

10 years agoFix overload index mismatch in overloading logic.
Vincent Pit [Fri, 2 Jan 2009 11:01:50 +0000 (12:01 +0100)] 
Fix overload index mismatch in overloading logic.

In amagic_call(), the 'method' arg comes the overload enum in overload.h, but is expected to match the bit set from %overloading::numbers::names. It values wrongly start at 1, differing by 1 from the enum indexes. This didn't appear in the tests because 'method' was reduced modulo 7 instead of 8.

10 years agoBump coopyright year in embed.pl and various files that were just touched
Rafael Garcia-Suarez [Fri, 2 Jan 2009 10:41:41 +0000 (11:41 +0100)] 
Bump coopyright year in embed.pl and various files that were just touched

(and run "make regen")

10 years agoFactorize numeric constant for "overloading" lexical hint
Rafael Garcia-Suarez [Fri, 2 Jan 2009 10:40:48 +0000 (11:40 +0100)] 
Factorize numeric constant for "overloading" lexical hint

10 years agoFaster sv_utf8_upgrade()
karl williamson [Fri, 2 Jan 2009 10:22:02 +0000 (11:22 +0100)] 
Faster sv_utf8_upgrade()

Consider what currently happens when the tokenizer is scanning a string.
It looks through it byte-by-byte until it finds a character that forces
it to decide to go to utf8.  It then calls sv_utf8_upgrade() with the
portion of the string scanned so far.

sv_utf8_upgrade() starts over from the beginning, and scans the string
byte-by-byte until it finds a character that varies between non-utf8 and
utf8.  It then calls bytes_to_utf8().

bytes_to_utf8() allocates a new string that can handle the worst case
expansion, 2n+1, of the entire string, and starts over from the
beginning, and scans the input string byte-by-byte copying and
converting each character to the output string as it goes.

It doesn't return the size of the new string, so sv_utf8_upgrade()
assumes it is only as big as what actually got converted, throwing away
knowledge of any spare.

It then returns to the tokenizer, which immediately does a grow to get
space for the unparsed input.  This is likely to cause a new string to
be allocated and copied from the one we had just created, even if that
string in actuality had enough space in it.

Thus, the invariant head portion of the string is scanned 3 times, and
probably 2 strings will be allocated and copied.

My solution to cutting this down is to do several things.

First, I added an extra flag for sv_utf8_upgrade that says don't bother
to check if the string needs to be converted to utf8, just assume it
does.  This eliminates one of the passes.

I also added a new parameter to sv_utf8_upgrade that says when you
return, I want this much unused space in the string.  That eliminates
the extra grow.

This was all done by renaming the current work-horse function from
sv_utf8_upgrade_flags to be sv_utf8_upgrade_flags_grow() and making the
current function name be a macro which calls the revised one with a 0
grow parameter.

I also improved the internal efficiency of sv_utf8_upgrade so that when
it does scan the string, it doesn't call bytes_to_utf8, but does the
conversion itself, using a fast memory copy instead of the byte-oriented
one for the invariant header, and it uses that header to get a better
estimate of the needed size of the new string, and it doesn't throw away
the knowledge of the allocated size.

And, if it is clear without scanning the whole string that the
conversion will fit in the already allocated string, it just uses that
instead of allocating and copying a new one, using the algorithm I
copied from the tokenizer.  (In this case it does have to finish
scanning the whole string to get the correct size.)  The comments have
details.

It still is byte-oriented.  Vectorization et. al. could yield
performance improvements.  One idea for that is in the comments.

The patch also includes a new synonym I created which is a more accurate
name than NATIVE_TO_ASCII.

10 years agoMerge branch 'yuval/overloading' into blead
Rafael Garcia-Suarez [Fri, 2 Jan 2009 09:46:53 +0000 (10:46 +0100)] 
Merge branch 'yuval/overloading' into blead

10 years agoBump copyright year after previous change
Rafael Garcia-Suarez [Fri, 2 Jan 2009 09:46:22 +0000 (10:46 +0100)] 
Bump copyright year after previous change

10 years ago[perl #54956] crash on binary-or lvalue operation on qr//
Ben Morrow [Fri, 2 Jan 2009 09:41:52 +0000 (10:41 +0100)] 
[perl #54956] crash on binary-or lvalue operation on qr//

This fixes the following problem:

  -e 'my $re = qr/x/; $re |= "y"'
  assert failure under 5.10.0, 10-maint, bleed, but not 5.8.8

10 years agoMention overloading.pm in perl5110delta
Rafael Garcia-Suarez [Fri, 2 Jan 2009 09:31:24 +0000 (10:31 +0100)] 
Mention overloading.pm in perl5110delta

10 years agoBump copyright year after previous change d15cd8313063e574
Rafael Garcia-Suarez [Fri, 2 Jan 2009 09:30:43 +0000 (10:30 +0100)] 
Bump copyright year after previous change d15cd8313063e574

10 years agoMove variable declaration without initialisation at the top
Rafael Garcia-Suarez [Fri, 2 Jan 2009 09:00:35 +0000 (10:00 +0100)] 
Move variable declaration without initialisation at the top

Plus a comment by Nicholas

10 years agoFix a couple of typos in overloading.pm docs
Rafael Garcia-Suarez [Fri, 2 Jan 2009 08:55:03 +0000 (09:55 +0100)] 
Fix a couple of typos in overloading.pm docs

10 years ago'overloading' pragma
Yuval Kogman [Sat, 9 Aug 2008 13:01:15 +0000 (16:01 +0300)] 
'overloading' pragma

10 years agoFrom: Max Maischein <corion@corion.net>
Abigail [Thu, 1 Jan 2009 17:54:01 +0000 (18:54 +0100)] 
From: Max Maischein <corion@corion.net>
Date: Thu, 01 Jan 2009 17:22:41 +0100
Subject: pod/perlrepositories.pod: s/asterix/asterisk/

10 years agoFirst cut at handling git patch numbers on VMS.
Craig A. Berry [Thu, 1 Jan 2009 16:41:35 +0000 (10:41 -0600)] 
First cut at handling git patch numbers on VMS.
Partially based on suggestions from John Malmberg at <495C279C.7020106@gmail.com>.

10 years agoSwitching to `` requires one more \ to escape $Config in new_config=`...`
Nicholas Clark [Wed, 31 Dec 2008 07:44:28 +0000 (07:44 +0000)] 
Switching to `` requires one more \ to escape $Config in new_config=`...`

10 years agoSwitching from $() to `` requires two more backticks in unpushed_commits=`...`
Nicholas Clark [Wed, 31 Dec 2008 07:42:55 +0000 (07:42 +0000)] 
Switching from $() to `` requires two more backticks in unpushed_commits=`...`

10 years agoMore efficient API choices for string appending.
Nicholas Clark [Wed, 31 Dec 2008 07:32:42 +0000 (07:32 +0000)] 
More efficient API choices for string appending.

10 years agocflags also runs under /bin/sh so can't use $()
Nicholas Clark [Wed, 31 Dec 2008 07:30:24 +0000 (23:30 -0800)] 
cflags also runs under /bin/sh so can't use $()

10 years agoSolaris awk (at least) thinks that + should be escaped.
Nicholas Clark [Wed, 31 Dec 2008 07:18:37 +0000 (23:18 -0800)] 
Solaris awk (at least) thinks that + should be escaped.

10 years agoSolaris /bin/sh doesn't do POSIX $( ... ) syntax for ` .... `
Nicholas Clark [Wed, 31 Dec 2008 07:16:50 +0000 (23:16 -0800)] 
Solaris /bin/sh doesn't do POSIX $( ... ) syntax for ` .... `

10 years agovarargs functions such as sv_catpvf can't have compatibility wrappers for
Nicholas Clark [Wed, 31 Dec 2008 07:14:15 +0000 (07:14 +0000)] 
varargs functions such as sv_catpvf can't have compatibility wrappers for
threads, so have to be written longhand as Perl_sv_catpvf(aTHX_ ...)  :-(

10 years agomuch better git related version numbering in our (*nix for now) build process
Yves Orton [Wed, 31 Dec 2008 00:16:23 +0000 (01:16 +0100)] 
much better git related version numbering in our (*nix for now) build process

The net result of this patch is to make available via Config.pm and -v/-V the
details about the git version info we have available for the build. When built within
a git repository git is queried directly. When built from a snapshot or bundle
it is assumed that the source is unchanged, and that the required details are
avaialble in a file called .patch, whose format current is a four field string
in the following format: "$branchname $date.$time $sha1 $describe". The
generator of these files currently resides on camel.booking.com.

* git-describe is now used more directly with -v.
When the prefix of git-describe matches the version number
as determined by the defines in patchlevel.h then we use ONLY
the git-describe output, otherwise we include
the git describe in parenthesis after the version number. Either way
the describe text is optionally followed by a star should there be
uncommitted changes.
eg: This is perl, v5.11.0 (GitLive-blead-136-g58ca560) built for i686-linux
or: This is perl, v5.11.0-1-g58ca560 built for i686-linux
or: This is perl, v5.11.0 built for i686-linux

* include the SHA1 in perl -V summary, and automatically include unpushed
commits in the registered patches list

* include various git/version/.patch details in %Config, as follows:

git_commit_id             # sha1 of HEAD
git_ancestor              # ancestor in $remote/$branch (presumably canonical)
git_describe              # git describe
git_branch                # current branch
git_uncommitted_changes   # "true" if there are any, empty otherwise
git_unpushed_commits      # List of sha1's of unpushed commits
git_commit_id_title       # Used to make the perl -V summary output

Additionally one more value is added depending on build process used: when
building from an rsynced snapshot (or any dist including a file called
.patch) then the second field will be used to populate the
"git_snapshot_date" field. Otherwise if built in a git directory (as is hopefully
recommended these day) then the field will be "git_commit_date" which will be the
commit date of HEAD.

This patch introduces two new files (on top of .patchnum) that will be generated by
make_patchnum.sh: "lib/Config_git.pl" and "unpushed.h", the former is used to make
git data available to Config.pm/%Config without rebuilding everything else, and the
second is used to expose unpushed commits (if any) via the registered patch facility
of patchlevel.h

10 years agoadded information how to build on Leopard
Igor Sutton [Tue, 30 Dec 2008 23:41:07 +0000 (00:41 +0100)] 
added information how to build on Leopard

10 years agoIn mro_get_mro, use the length and UTF-8-ness now contained in struct mro_alg
Nicholas Clark [Mon, 29 Dec 2008 22:43:40 +0000 (22:43 +0000)] 
In mro_get_mro, use the length and UTF-8-ness now contained in struct mro_alg
when generating an SV containing the name.

10 years agoMark my dual-life modules as authoritative in blead
Rafael Garcia-Suarez [Mon, 29 Dec 2008 12:39:48 +0000 (13:39 +0100)] 
Mark my dual-life modules as authoritative in blead

10 years agoPL_registered_mros can start with 1 hash bucket, as it will probably never
Nicholas Clark [Mon, 29 Dec 2008 11:22:55 +0000 (11:22 +0000)] 
PL_registered_mros can start with 1 hash bucket, as it will probably never
contain more than "dfs", and even if C3 is loaded, 2 buckets are less than the
default of 8.

10 years agoBump switch version to 2.14
Rafael Garcia-Suarez [Mon, 29 Dec 2008 08:50:06 +0000 (09:50 +0100)] 
Bump switch version to 2.14

10 years agoMake Switch.pm skip POD like perl does
Rafael Garcia-Suarez [Sun, 28 Dec 2008 22:30:57 +0000 (23:30 +0100)] 
Make Switch.pm skip POD like perl does

Patch provided by Daniel Klein <danielklein-à-airpost.net> :

  It also doesn't check for invalid POD which gets ignored by the
  compiler anyway.

Seems that Damian had a POD parser in mind when he devised those
regular expressions, but perl only looks for =cut followed by a
non-letter.

10 years agoFix line numbering issues with POD filtered by Switch.pm
Rafael Garcia-Suarez [Sun, 28 Dec 2008 22:20:46 +0000 (23:20 +0100)] 
Fix line numbering issues with POD filtered by Switch.pm

Patch provided by Daniel Klein <danielklein-à-airpost.net> :

  I noticed a very subtle bug in the code: it filters out all detected POD
  from the source code. This means that any line number reporting after
  POD code will be out by the number of POD lines removed. So if there is
  an error or a "warn"ing in the code it will be harder for the programmer
  to track down.

10 years agoSwitch.pm doesn't appear to support plain arrays and hashes in case().
Rafael Garcia-Suarez [Sun, 28 Dec 2008 22:03:27 +0000 (23:03 +0100)] 
Switch.pm doesn't appear to support plain arrays and hashes in case().

10 years agoLet us direct Switch questions to P5P.
Rafael Garcia-Suarez [Sun, 28 Dec 2008 18:52:44 +0000 (19:52 +0100)] 
Let us direct Switch questions to P5P.

I still can release versions of Switch to CPAN, but I prefer
to consider the blead version canonical.

10 years agoHandle non-numeric version numbers in ext/Digest/MD5/Makefile.PL
Jerry Hedden [Tue, 23 Dec 2008 16:49:36 +0000 (11:49 -0500)] 
Handle non-numeric version numbers in ext/Digest/MD5/Makefile.PL

10 years agoAlso define 'localizing' in pp_helem for the sake of clarity
Vincent Pit [Sun, 28 Dec 2008 16:10:31 +0000 (17:10 +0100)] 
Also define 'localizing' in pp_helem for the sake of clarity

10 years agoOn scope end, delete localized array elements that should not exist anymore, so that...
Vincent Pit [Sun, 28 Dec 2008 14:08:05 +0000 (15:08 +0100)] 
On scope end, delete localized array elements that should not exist anymore, so that the array recovers its previous length. Honour EXISTS and DELETE for tied arrays.

10 years agoAdd save_adelete()/SAVEADELETE() to save on the stack an array element delete
Vincent Pit [Sun, 28 Dec 2008 12:49:41 +0000 (13:49 +0100)] 
Add save_adelete()/SAVEADELETE() to save on the stack an array element delete

10 years agoIntroduce SvCANEXISTDELETE in pp.h, which simplify the logic in pp_helem and pp_hslice
Vincent Pit [Sun, 28 Dec 2008 10:16:54 +0000 (11:16 +0100)] 
Introduce SvCANEXISTDELETE in pp.h, which simplify the logic in pp_helem and pp_hslice

10 years agoFix malformed utf8 in regexec.c
Karl [Fri, 26 Dec 2008 17:45:05 +0000 (10:45 -0700)] 
Fix malformed utf8 in regexec.c

10 years agoRevise malformed utf8 test case
Karl [Sun, 28 Dec 2008 14:18:24 +0000 (07:18 -0700)] 
Revise malformed utf8 test case

10 years agoAdd casts to gain C++ compatibility, as spotted by Yves.
Nicholas Clark [Sun, 28 Dec 2008 14:21:03 +0000 (14:21 +0000)] 
Add casts to gain C++ compatibility, as spotted by Yves.

10 years agoAdd a key flag HVhek_KEYCANONICAL for Perl_hv_common(), which signals that the
Nicholas Clark [Sun, 28 Dec 2008 13:06:42 +0000 (13:06 +0000)] 
Add a key flag HVhek_KEYCANONICAL for Perl_hv_common(), which signals that the
key is in canonical form - any key passed encoded in UTF-8 cannot be represented
as bytes, hence the downgrade check can be skipped. Use this internally for
shared hash key scalars, as they are always canonical.

10 years agoVerify that pre-computing hashes with shared hash key scalars does not cause
Nicholas Clark [Sun, 28 Dec 2008 12:36:16 +0000 (12:36 +0000)] 
Verify that pre-computing hashes with shared hash key scalars does not cause
problems.

10 years agoAlso test Perl_hv_common() and pre-computed hashes for SV keys.
Nicholas Clark [Sun, 28 Dec 2008 09:50:21 +0000 (09:50 +0000)] 
Also test Perl_hv_common() and pre-computed hashes for SV keys.