platform/upstream/perl.git
12 years agoperldiag: Rewrap ‘length() used on %s’
Father Chrysostomos [Thu, 17 Nov 2011 20:43:15 +0000 (12:43 -0800)]
perldiag: Rewrap ‘length() used on %s’

splain output looks better in an 80-column terminal this way.

12 years agoThrow a helpful warning when someone tries length(@array) or length(%hash)
Matthew Horsfall (alh) [Thu, 17 Nov 2011 04:06:33 +0000 (23:06 -0500)]
Throw a helpful warning when someone tries length(@array) or length(%hash)

12 years agoTweak the cBOOL() macro to avoid problems with the AIX compiler.
Nicholas Clark [Tue, 15 Nov 2011 18:44:18 +0000 (19:44 +0100)]
Tweak the cBOOL() macro to avoid problems with the AIX compiler.
(cherry picked from commit 0cebf65582f924952bfee1472749d442d51e43e6)

12 years agoFix threaded build
Father Chrysostomos [Fri, 18 Nov 2011 23:55:08 +0000 (15:55 -0800)]
Fix threaded build

Commit a7999c0893, you are at fault!

12 years agoperldelta: fix for $DB::sub with bad subname
Father Chrysostomos [Fri, 18 Nov 2011 20:42:45 +0000 (12:42 -0800)]
perldelta: fix for $DB::sub with bad subname

12 years agoUpdate several test cases to not generate failures on VOS.
Paul Green [Thu, 10 Nov 2011 22:34:19 +0000 (17:34 -0500)]
Update several test cases to not generate failures on VOS.

12 years agoMake sure $DB::sub is callable
Father Chrysostomos [Fri, 18 Nov 2011 17:08:32 +0000 (09:08 -0800)]
Make sure $DB::sub is callable

When DB::sub is about to be called (to handle a subroutine call under
the debugger), $DB::sub is set to the name of the subroutine or a ref-
erence to it.

Sometimes $DB::sub is set to the name when the subroutine is not call-
able under that name.  That should not happen.

This logic in util.c:Perl_get_db_sub decides whether a reference
should be used:

if ( svp && ((CvFLAGS(cv) & (CVf_ANON | CVf_CLONED))
     || strEQ(GvNAME(gv), "END")
     || ((GvCV(gv) != cv) && /* Could be imported, and old sub redefined. */
 !( (SvTYPE(*svp) == SVt_PVGV)
    && (GvCV((const GV *)*svp) == cv)
    && (gv = (GV *)*svp)
  )
)
)) {
    /* Use GV from the stack as a fallback. */

(That comment about using the GV from the stack as a fallback applies
to the assignment to gv, but was mistakenly divorced from it in commit
3de9ffa12.)

This logic (introduced in 71be2cbc7 [inseparable changes from
perl5.003_13 to perl5.003_14] and integrated into blead in 491527d02)
tries to find a GV that points to the CV, trying the CV’s own GV
first, and falling back to what is on the stack.  But it does not
account for GVs that are not found under their names, which can hap-
pen when a glob is copied and the original is undefined ($foo = *bar;
undef *bar; &$foo) or when a stash element or package is deleted, such
as via Symbol::delete_package.

If the subroutine is not locatable under its own name or the name
under which it was called (the name of the GV argument to entersub),
then a reference should be passed.  Otherwise a name that can access
the sub should be passed.

So this commit adds more (no, not more!) conditions to make sure the
gv is actually reachable under its name before using a string.

Since, for effiency, those conditions do not perform an actual symbol
lookup, but simply look inside the GV’s stash, we can no longer rely
on gv_efullname (or even gv_fullname), as the stash may have been
moved around, but use HvENAME and construct the GV name ourselves.

12 years agoRemove redundant check in pp_hot.c:pp_entersub
Father Chrysostomos [Fri, 18 Nov 2011 00:38:42 +0000 (16:38 -0800)]
Remove redundant check in pp_hot.c:pp_entersub

PVGVs are always globs now.

12 years agoUpdate IO-Compress to CPAN version 2.042
Chris 'BinGOs' Williams [Fri, 18 Nov 2011 20:11:08 +0000 (20:11 +0000)]
Update IO-Compress to CPAN version 2.042

  [DELTA]

  2.042 17 November 2011

      * IO::Compress::Zip
        - Added exUnixN option to allow creation of the "ux" extra field.
          This allows 32-bit UID/GID to be stored.
        - In one-shot mode use exUnixN rather than exUnix2 for the UID/GID.

      * IO::Compress::Zlib::Extra::parseExtraField
        - Fixed bad test for length of ID field
          [RT# 72329 & #72505]

12 years agoUpdate Compress-Raw-Zlib to CPAN version 2.042
Chris 'BinGOs' Williams [Fri, 18 Nov 2011 20:06:18 +0000 (20:06 +0000)]
Update Compress-Raw-Zlib to CPAN version 2.042

  [DELTA]

  2.042 17 November 2011

      * No Changes

12 years agoUpdate Compress-Raw-Bzip2 to CPAN version 2.042
Chris 'BinGOs' Williams [Fri, 18 Nov 2011 19:59:16 +0000 (19:59 +0000)]
Update Compress-Raw-Bzip2 to CPAN version 2.042

  [DELTA]

  2.042 17 November 2011

      * No Changes

12 years agoSeparate the build and non-build functionality of pod/buildtoc
Nicholas Clark [Fri, 18 Nov 2011 10:22:58 +0000 (11:22 +0100)]
Separate the build and non-build functionality of pod/buildtoc

pod/buildtoc now now only generates pod/perltoc.pod
All the other file (re)generation code is now in Porting/pod_rules.pl
Porting/new-perldelta.pl automates adding a new perldelta

This should simplify the release manager's work.

12 years agoNote the changes to pod/buildtoc in the perldelta.
Nicholas Clark [Tue, 15 Nov 2011 12:17:41 +0000 (13:17 +0100)]
Note the changes to pod/buildtoc in the perldelta.

Principally to note that no-one should notice the difference, but give a clue
as to what might be wrong if they do.

12 years agoIn buildtoc, refactor to de-duplicate code and variables.
Nicholas Clark [Thu, 10 Nov 2011 14:41:47 +0000 (15:41 +0100)]
In buildtoc, refactor to de-duplicate code and variables.

Converting the globals %Pragmata and %Modules to keys in a single hash
reduces the code size.

12 years agoRefactor pod_rules.pl and buildtoc to use new functions in pod_lib.pl
Nicholas Clark [Thu, 10 Nov 2011 10:52:34 +0000 (11:52 +0100)]
Refactor pod_rules.pl and buildtoc to use new functions in pod_lib.pl

This reduces code duplication.

12 years agoPorting/pod_rules.pl should not warn about files that it is rebuilding.
Nicholas Clark [Thu, 10 Nov 2011 10:18:06 +0000 (11:18 +0100)]
Porting/pod_rules.pl should not warn about files that it is rebuilding.

Previously it would generate warnings about inconsistencies in files, even if
it was about to rewrite the file to be consistent.

12 years agoAdd Porting/new-perldelta.pl, which automates adding a new perldelta.
Nicholas Clark [Wed, 9 Nov 2011 20:50:56 +0000 (21:50 +0100)]
Add Porting/new-perldelta.pl, which automates adding a new perldelta.

Strictly, "mostly automates", as it doesn't run `git add`, or test that the
build is clean. However, it simplifies a gnarly step in the release manager's
guide, so it's progress.

12 years agoFlag to get_pod_metadata() whether generated files are expected.
Nicholas Clark [Wed, 9 Nov 2011 16:25:57 +0000 (17:25 +0100)]
Flag to get_pod_metadata() whether generated files are expected.

This permits Porting/pod_rules.pl to be run from a clean checkout without
warning, which simplifies updating perl's version.

12 years agoRefactor pod_lib.pl's get_pod_metadata() to remove a temporary array.
Nicholas Clark [Wed, 9 Nov 2011 12:40:59 +0000 (13:40 +0100)]
Refactor pod_lib.pl's get_pod_metadata() to remove a temporary array.

The intermediate array @cpanpods can be avoided by generating the lookup
hashes directly.

Rename %cpanpods_short to %cpanpods_leaf and $shortname to $leafname, as this
makes it clearer that each deals with leafnames.

12 years agoRename t/porting/buildtoc.t to pod_rules.t to reflect the previous change.
Nicholas Clark [Wed, 9 Nov 2011 12:52:29 +0000 (13:52 +0100)]
Rename t/porting/buildtoc.t to pod_rules.t to reflect the previous change.

As it now calls Porting/pod_rules.pl, not pod/buildtoc, it makes little sense
to keep the previous name.

12 years agoCreate Porting/pod_rules.pl, with all non perltoc.pod code from buildtoc.
Nicholas Clark [Tue, 8 Nov 2011 14:11:46 +0000 (15:11 +0100)]
Create Porting/pod_rules.pl, with all non perltoc.pod code from buildtoc.

pod/buildtoc now only generates pod/perltoc.pod, and only takes a --quiet
option. All the other file (re)generation code is now in Porting/pod_rules.pl.

This splits functionality which generates a new file at build time from
functionality for maintainers, which edits files in place. This permits the
unwinding of some of commit 02cc404a20a8a345, which achieved net
simplification in pod/buildtoc by merging code paths dealing with new files
(only pod/perltoc.pod) and existing files being edited.

pod_rules.pl has a --tap option, instead of buildtoc's non-standard --test
option, and defaults to --build-all if no arguments are passed. As buildtoc
now does one job, it no longer takes a --build-toc option, hence all the
Makefiles which call it need updating.

12 years agoIn pod_lib.pl's get_pod_metadata(), generate lookup hashes directly.
Nicholas Clark [Tue, 8 Nov 2011 08:45:24 +0000 (09:45 +0100)]
In pod_lib.pl's get_pod_metadata(), generate lookup hashes directly.

Previously the code was structured to build arrays for various categories of
files, then generate hashes from those arrays. However, the arrays had no
other purpose, and the values in the hashes were only needed for truth tests,
so it's better to generate the lookup hashes directly.

@disk_pods hasn't actually been used since commit d5e2eea989a69524 refactored
pod/buildtoc to no longer chdir to the pod/ directory.

12 years agoExtract from buildtoc the code that processes pod.lst, MANIFEST and perl.pod
Nicholas Clark [Tue, 8 Nov 2011 08:29:33 +0000 (09:29 +0100)]
Extract from buildtoc the code that processes pod.lst, MANIFEST and perl.pod

This will permit splitting pod/buildtoc into two - one script used during
the build process to build pod/perltoc.pod, and used by maintainers to
regenerate sections of various Makefiles.

12 years agoIn buildtoc, refactor the code that reads pod.lst, MANIFEST and perl.pod
Nicholas Clark [Tue, 8 Nov 2011 08:09:02 +0000 (09:09 +0100)]
In buildtoc, refactor the code that reads pod.lst, MANIFEST and perl.pod

Move the code into a function, get_pod_metadata(), which returns a reference
to a hash of metadata. This replaces a swathe of global variables.

12 years agobuildtoc --showfiles should report the correct pathnames.
Nicholas Clark [Tue, 8 Nov 2011 13:39:41 +0000 (14:39 +0100)]
buildtoc --showfiles should report the correct pathnames.

The output of --showfiles has been garbled since commit d5e2eea989a69524
refactored pod/buildtoc to no longer chdir to the pod/ directory.

12 years agobuildtoc --showfiles should only list the files to regenerated.
Nicholas Clark [Tue, 8 Nov 2011 13:29:08 +0000 (14:29 +0100)]
buildtoc --showfiles should only list the files to regenerated.

This fixes a bug caused by the refactoring of commit 9dce16cd064e70e6,
which caused --showfiles to always list list all known files, irrespective
of which had been specified with command line flags.

12 years agoIn buildtoc, don't use File::Spec when initialising %BuildFiles.
Nicholas Clark [Tue, 8 Nov 2011 10:57:53 +0000 (11:57 +0100)]
In buildtoc, don't use File::Spec when initialising %BuildFiles.

%BuildFiles is initialised from the leafnames of %Build, which is
initialised from %Targets, which always contains pathnames in Unix
format. Hence using File::Spec->splitpath() is actually erroneous, as it
will process pathnames assuming the format for the current platform.

12 years agoIn buildtoc, refactor the open ... or my_die pattern into a function.
Nicholas Clark [Mon, 7 Nov 2011 20:36:55 +0000 (21:36 +0100)]
In buildtoc, refactor the open ... or my_die pattern into a function.

This eliminates several variables used for filenames, including $masterpodfile,
which was declared as a global.

12 years agoIn buildtoc, make %Readmepods lexical, and $delta_target global.
Nicholas Clark [Mon, 7 Nov 2011 20:23:39 +0000 (21:23 +0100)]
In buildtoc, make %Readmepods lexical, and $delta_target global.

%Readmepods is only used within the code to read pod.lst, pod/perlpod.pod
and MANIFEST, not by the generation code.
$delta_target is set by the reading code, but used in the generation code.

This makes the use of global and lexical variables more consistent.

12 years agoIn buildtoc, eliminate abs_from_top() as it now runs from the top level.
Nicholas Clark [Mon, 7 Nov 2011 12:21:12 +0000 (13:21 +0100)]
In buildtoc, eliminate abs_from_top() as it now runs from the top level.

There's also no need to convert to native path specs, as no paths are passed
to external commands, and the perl runtime on all platforms understands
unambiguously Unix-like paths.

12 years agoIn pod/buildtoc, chdir to the top level of the source tree before running.
Nicholas Clark [Mon, 7 Nov 2011 12:03:09 +0000 (13:03 +0100)]
In pod/buildtoc, chdir to the top level of the source tree before running.

Originally buildtoc called chdir to ensure it ran from the pod/ directory.
However, this caused problems when the environment is set to honour UTF-8
locales, and the regex engine (attempts to) demand-load UTF-8 swashes,
because on *nix and VMS buildtoc is invoked with a relative path in @INC.
d5e2eea989a69524 fixed this by avoiding the chdir.

However, an equally valid solution is to run from the top level of the source
tree, because the actual use cases only have relative paths in @INC when
invoked from the top level, with absolute paths in @INC for the use cases
that invoke perltoc from other directories. Hence, it's always safe to change
to the top level of the source tree. This permits future simplification and
refactoring.

12 years agoLocalise $/ properly in UCD.pm
Father Chrysostomos [Thu, 17 Nov 2011 23:53:18 +0000 (15:53 -0800)]
Localise $/ properly in UCD.pm

Localisation of $/ in the module’s main CV is undone once the module
finishes loading, and hence has no effect on its function after that.
Each function that uses readline has to localise $/ itself.

12 years agoDetect whether ccache is available to bisect.
Paul Johnson [Thu, 17 Nov 2011 20:20:15 +0000 (21:20 +0100)]
Detect whether ccache is available to bisect.

ccache will save time during a bisect but it may not always be availble.
Teach bisect-runner.pl to only use it if it is available.

12 years agoturn off buggy optimisations in one HP compiler
Zefram [Thu, 17 Nov 2011 19:53:04 +0000 (19:53 +0000)]
turn off buggy optimisations in one HP compiler

Fixes [perl #103668].

12 years agoRe-deprecate $[
Father Chrysostomos [Thu, 17 Nov 2011 17:59:09 +0000 (09:59 -0800)]
Re-deprecate $[

This was something e1dccc0d3 removed that b82b06b8 failed to restore.

12 years agoarybase.xs: Don’t use arybase::[
Father Chrysostomos [Thu, 17 Nov 2011 17:38:20 +0000 (09:38 -0800)]
arybase.xs: Don’t use arybase::[

arybase was changing $[=1 to $arybase::[ = 1 to avoid any run-time
effects.  In case this module is ever dual-lifed, we ought to avoid
punctuation variables even outside the main stash.  See bug #76138.

This is a classic example of paranoia.

12 years agoarybase.xs: Check that $[ is in the main stash
Father Chrysostomos [Thu, 17 Nov 2011 17:35:53 +0000 (09:35 -0800)]
arybase.xs: Check that $[ is in the main stash

Check that $[ is in the main stash before doing anything magical with
$[=1.  This can only be in another stash if some other XS module has
overridden the check functions to change $[ to $foo::[.  But robust-
ness is good, right?

12 years agoAdd can_isa_ok.t to MANIFEST
Father Chrysostomos [Thu, 17 Nov 2011 17:40:49 +0000 (09:40 -0800)]
Add can_isa_ok.t to MANIFEST

12 years agoAdd class_ok() and object_ok() to t/test.pl.
Michael G. Schwern [Wed, 16 Nov 2011 01:39:07 +0000 (17:39 -0800)]
Add class_ok() and object_ok() to t/test.pl.

Change every existing instance of isa_ok() to use object_ok().  This is safe because
before this point, t/test.pl's isa_ok() only worked on objects.  lib/dbmt_common.pl is
the last hold out because it uses Test::More.

These are like isa_ok() but they also check if it's a class or an object.
This lets the core tests defend against outlandish bugs while allowing
t/test.pl to retain feature parity with Test::More.

12 years agoPatch t/test.pl so isa_ok() works with objects.
Michael G. Schwern [Wed, 16 Nov 2011 01:14:52 +0000 (17:14 -0800)]
Patch t/test.pl so isa_ok() works with objects.

This mirrors can_ok() and Test::More.

Also add some tests for isa_ok() and can_ok().

12 years agoSun cc and CC do not support gcc attributes.
Reini Urban [Tue, 15 Nov 2011 22:14:28 +0000 (16:14 -0600)]
Sun cc and CC do not support gcc attributes.

Similar code as in linux.sh

12 years agoDetect SunOS CC workshop c++ compiler
Reini Urban [Tue, 15 Nov 2011 22:11:02 +0000 (16:11 -0600)]
Detect SunOS CC workshop c++ compiler

Solaris 11 SunStudio 12.2. ships without cc, so CC must be used.
Detect it and set ccversion correctly

12 years agoperldelta for #70151
Father Chrysostomos [Thu, 17 Nov 2011 16:39:06 +0000 (08:39 -0800)]
perldelta for #70151

12 years agoDocument S_doeval’s calling convention
Father Chrysostomos [Thu, 17 Nov 2011 02:21:16 +0000 (18:21 -0800)]
Document S_doeval’s calling convention

This should make it easier for future maintainers, who now will not
have to figure out what I figured out.

12 years ago[perl #70151] eval localises %^H at runtime
Father Chrysostomos [Thu, 17 Nov 2011 02:18:23 +0000 (18:18 -0800)]
[perl #70151] eval localises %^H at runtime

It doesn’t any more.

Now the hints are localised in a separate inner scope surrounding the
call to yyparse.  This meant moving hint-handling code from pp_require
and pp_entereval into S_doeval.

Some tests in t/comp/hints.t were testing for the buggy behaviour, so
they have been adjusted.

Basically, this fixes

    sub import {
        eval "strict->import"
    }

which should work the same way as

    sub import {
        strict->import
    }

but was not working because %^H and $^H were being localised to
the eval at its run time, not just its compilation.  So the values
assigned to %^H and $^H at the eval’s run time would simply be lost.

12 years agoperldelta for PL_curcop localisation
Father Chrysostomos [Thu, 17 Nov 2011 16:36:43 +0000 (08:36 -0800)]
perldelta for PL_curcop localisation

12 years agoLocalise PL_curcop for BEGIN blocks
Father Chrysostomos [Thu, 17 Nov 2011 16:34:31 +0000 (08:34 -0800)]
Localise PL_curcop for BEGIN blocks

Usually when a BEGIN block exits it has to set PL_curcop to
&PL_compiling, so that subsequent compiled code in the surrounding
scope will have the right warning hints during compilation.

If an XS function creates a BEGIN block via newXS or newATTRSUB, how-
ever, the assumption that compilation will resume as soon as the block
exits is false.

This can be demonstrated with this code, which warns about CHECK and
INIT blocks created too late when it shouldn’t due to ‘no warnings’:

use warnings;
eval q|
  BEGIN{
    no warnings;
    package XS::APItest; require XSLoader; XSLoader::load()
  }
|;

In every case where it is correct for BEGIN to set PL_curcop to
&PL_compiling when it exits it is actually just restoring it to its
previous value, so localisation is the right fix.

12 years agoCombine two blocks in pp_ctl.c:S_doeval
Father Chrysostomos [Wed, 16 Nov 2011 02:06:10 +0000 (18:06 -0800)]
Combine two blocks in pp_ctl.c:S_doeval

As of commit e4a21daa4e9 which removed the intervening code, there
have been two adjacent if blocks in S_doeval with the same condition.
They can be merged into one, to avoid confusing people (like me) try-
ing to understand the code.

12 years agoeval.t: add bug number
Father Chrysostomos [Tue, 15 Nov 2011 13:54:14 +0000 (05:54 -0800)]
eval.t: add bug number

12 years agoeval.t: typos
Father Chrysostomos [Tue, 15 Nov 2011 13:49:28 +0000 (05:49 -0800)]
eval.t: typos

12 years agoAdd --check-shebang to bisect-runner.pl, to avoid mistakes with #! lines
Nicholas Clark [Thu, 17 Nov 2011 16:59:22 +0000 (17:59 +0100)]
Add --check-shebang to bisect-runner.pl, to avoid mistakes with #! lines

This allows bisect.pl to instruct bisect-runner.pl to check that the user's
testcase is not a script with a #! line which will run an installed perl.
This rapidly catches the potential error of specifying a test case that will
not actually be tested with the bisect-build perl. Without this, the user
may end up with an unexpected failure to bisect, and little clue as to what
the actual problem is.

12 years agoNote in Porting/bisect.pl that its documentation is in bisect-runner.pl
Nicholas Clark [Thu, 17 Nov 2011 15:15:06 +0000 (16:15 +0100)]
Note in Porting/bisect.pl that its documentation is in bisect-runner.pl

It may not be obvious to anyone skimming for Pod that they need to look
elsewhere to find it.

12 years agoFix fatal bug in bisect-runner.pl for some 5.004 revisions.
Nicholas Clark [Thu, 17 Nov 2011 16:42:59 +0000 (17:42 +0100)]
Fix fatal bug in bisect-runner.pl for some 5.004 revisions.

Commit afc98f896ef0b0e2 tweaked bisect-runner.pl to patch a bug in perl.c
introduced in commit 2a92aaa05aa1acbf and fixed in commit 8490252049bf42d3.
However, it didn't check properly whether it should apply the patch at all,
hence caused bisect-runner.pl to abort for some other revisions. Now fixed.

12 years agoUnused variable in in sv_eq
Brian Fraser [Thu, 17 Nov 2011 15:06:53 +0000 (08:06 -0700)]
Unused variable in in sv_eq

12 years agoFix misprint in doc of UNIVERSAL
Perlover [Thu, 17 Nov 2011 02:46:41 +0000 (19:46 -0700)]
Fix misprint in doc of UNIVERSAL

12 years agoavoid some test-time warnings
Zefram [Wed, 16 Nov 2011 21:31:41 +0000 (21:31 +0000)]
avoid some test-time warnings

12 years ago\x-ify non-ASCII chars in C string literal
Zefram [Wed, 16 Nov 2011 20:39:42 +0000 (20:39 +0000)]
\x-ify non-ASCII chars in C string literal

12 years agoexpunge gratuitous Unicode punctuation in comments
Zefram [Wed, 16 Nov 2011 20:32:56 +0000 (20:32 +0000)]
expunge gratuitous Unicode punctuation in comments

12 years ago$Config{locincpath} might be empty
H.Merijn Brand [Tue, 15 Nov 2011 16:07:56 +0000 (17:07 +0100)]
$Config{locincpath} might be empty

This causes h2xs.t to fail on systems where that is the case

12 years agoperldelta additions
Karl Williamson [Tue, 15 Nov 2011 15:29:50 +0000 (08:29 -0700)]
perldelta additions

12 years agofeature.pm: Avoid repetition; save memory
Father Chrysostomos [Tue, 15 Nov 2011 12:58:50 +0000 (04:58 -0800)]
feature.pm: Avoid repetition; save memory

12 years agoAdd 5.16 feature bundle
Father Chrysostomos [Tue, 15 Nov 2011 12:52:25 +0000 (04:52 -0800)]
Add 5.16 feature bundle

It needs to be added some time before the major version
bump, so now is as good a time as any.

12 years agoperldelta up to 7c5c3d9b
Father Chrysostomos [Tue, 15 Nov 2011 06:47:12 +0000 (22:47 -0800)]
perldelta up to 7c5c3d9b

12 years agoMove a pp_entereval comment where it belongs.
Father Chrysostomos [Mon, 7 Nov 2011 01:51:25 +0000 (17:51 -0800)]
Move a pp_entereval comment where it belongs.

Commit f9bddea7d2 divorced it from the code it was describing (dele-
tion of the FILEGV on eval exit).  That code was subsequently repeated
in various places by commit 78da7625.  The comment is now above the
first instance.

12 years agoInternals::SvREFCNT() now treats reference counts as unsigned
Tony Cook [Mon, 14 Nov 2011 08:48:54 +0000 (19:48 +1100)]
Internals::SvREFCNT() now treats reference counts as unsigned

Previously setting a large (negative in 32-bit signed) reference count
would be returned as a positive number on 64-bit builds and negative
on 32-bit builds.

12 years ago[rt #103222] make Internals::SvREFCNT set/get consistent
Tony Cook [Mon, 14 Nov 2011 08:30:17 +0000 (19:30 +1100)]
[rt #103222] make Internals::SvREFCNT set/get consistent

12 years agomatch the definition of S_mro_gather_and_rename to its declaration
Tony Cook [Mon, 14 Nov 2011 07:50:52 +0000 (18:50 +1100)]
match the definition of S_mro_gather_and_rename to its declaration

Based on the warning from:

http://www.nntp.perl.org/group/perl.daily-build.reports/2011/11/msg108741.html

which I haven't been able to produce in any other compiler.

12 years agoIn Perl_lex_start(), don't read the byte before SvPVX().
Nicholas Clark [Sun, 13 Nov 2011 18:07:09 +0000 (19:07 +0100)]
In Perl_lex_start(), don't read the byte before SvPVX().

If len is 0, we shouldn't be reading from len - 1, as it's one before the
start of the buffer, and hence an out of bounds read.

Fixes a bug inadvertently added by commit 0abcdfa4c5da571f, restoring the
previous behaviour for the len == 0 case.

12 years agoUpdate string copying in vms/vms.c
Craig A. Berry [Sun, 13 Nov 2011 13:21:05 +0000 (07:21 -0600)]
Update string copying in vms/vms.c

In several places strncpy was being used to copy a string of known
length with null handling done separately; those cases have been
converted to use memcpy.  Most uses of strncpy and strcpy have
been converted to my_strlcpy and most uses of strcat have been
converted to my_strlcat.

12 years agoUpdate CGI to CPAN version 3.58
Chris 'BinGOs' Williams [Sat, 12 Nov 2011 23:26:25 +0000 (23:26 +0000)]
Update CGI to CPAN version 3.58

  [DELTA]

  Version 3.58 Nov 11th, 2011

    [DOCUMENTATION]
    - Clarify that using query_string() only has defined behavior when using the GET method. (RT#60813)

12 years agomktables: nits in comment and pod
Karl Williamson [Sat, 12 Nov 2011 17:42:23 +0000 (10:42 -0700)]
mktables: nits in comment and pod

12 years agomktables: Remove support for deprecated properties
Karl Williamson [Sat, 12 Nov 2011 17:34:43 +0000 (10:34 -0700)]
mktables: Remove support for deprecated properties

As proposed and agreed some months ago, certain deprecated since 5.12
Unicode properties that Perl should never have exposed are removed.
These are Unicode-internal properties that are proper subsets of the
properties that should be used instead; and are used by Unicode for
stability reasons in constructing those supersets.

12 years agoperlunicode: Update reference to Unicode standard
Karl Williamson [Sat, 12 Nov 2011 16:01:00 +0000 (09:01 -0700)]
perlunicode: Update reference to Unicode standard

12 years agoutf8.c: typo in comment
Karl Williamson [Sat, 12 Nov 2011 15:46:41 +0000 (08:46 -0700)]
utf8.c: typo in comment

12 years agopp.c: Make sure variable is initialized
Karl Williamson [Sat, 12 Nov 2011 15:45:40 +0000 (08:45 -0700)]
pp.c: Make sure variable is initialized

A compiler generated a warning about this.  It is the degenerate case
with an empty input, so isn't really a problem, but silence the warning

12 years agoAdd new mktables generated files to makefiles
Karl Williamson [Fri, 11 Nov 2011 20:08:18 +0000 (13:08 -0700)]
Add new mktables generated files to makefiles

This step was omitted from commit
0765b2b82b120f4e57571368932aa4863aba62f6

12 years agoignore some newer build generated files
Tony Cook [Sat, 12 Nov 2011 00:55:24 +0000 (11:55 +1100)]
ignore some newer build generated files

12 years agoUpdate CPANPLUS to CPAN version 0.9112
Chris 'BinGOs' Williams [Fri, 11 Nov 2011 20:21:41 +0000 (20:21 +0000)]
Update CPANPLUS to CPAN version 0.9112

  [DELTA]

  Changes for 0.9112      Fri Nov 11 11:10:59 2011
  ================================================
  * The 'perlwrapper' is no longer required.

12 years agoregexec.c: Bypass unneeded step
Karl Williamson [Fri, 11 Nov 2011 20:05:19 +0000 (13:05 -0700)]
regexec.c: Bypass unneeded step

We don't have to convert from utf8 to code point to fold; instead can
call the function that starts from utf8

12 years agoregcomp.c: Bypass unneeded step
Karl Williamson [Fri, 11 Nov 2011 20:03:58 +0000 (13:03 -0700)]
regcomp.c: Bypass unneeded step

We don't have to convert from utf8 to code point to fold; instead can
call the function that starts from utf8

12 years agoUse new/revised case-changing functions in pp.c
Karl Williamson [Fri, 11 Nov 2011 20:33:12 +0000 (13:33 -0700)]
Use new/revised case-changing functions in pp.c

The intelligence that formerly was only in the functions in pp.c has in
previous commits migrated downward to the base level functions in
utf8.c.  Most of this was enabled by removing user-defined case
changing.  It make the code smaller and more maintainable to not have to
repeat the intelligence needed to handle the special cases, at the cost
of one or two function call overheads, which could be eliminated by
converting to in-line functions

Some of this knowledge of special case changing is retained in
converting to titlecase, simply because I didn't see a way to eliminate
it. And in uppercase because, I felt it was worth it to keep the tight
loop.

12 years agoutf8.c: Skip extra function calls
Karl Williamson [Fri, 11 Nov 2011 20:01:35 +0000 (13:01 -0700)]
utf8.c: Skip extra function calls

The function to_uni_fold() works without requiring conversion first to
utf8.

12 years agopp.c: Call subroutine instead of repeat code
Karl Williamson [Fri, 11 Nov 2011 19:23:00 +0000 (12:23 -0700)]
pp.c: Call subroutine instead of repeat code

Now that there is a function that can convert a latin1 character to
title or upper case without going out to swashes, we can call it instead
of repeating the code.  There is the additional overhead of a function
call, but this could be avoided if it comes down to it by making it
in-line.

12 years agopp.c: Remove macro no-longer called
Karl Williamson [Fri, 11 Nov 2011 18:59:05 +0000 (11:59 -0700)]
pp.c: Remove macro no-longer called

12 years agopp.c: Call subroutine instead of repeat code
Karl Williamson [Fri, 11 Nov 2011 18:45:29 +0000 (11:45 -0700)]
pp.c: Call subroutine instead of repeat code

Now that there is a function that can convert a latin1 character to
title or upper case without going out to swashes, we can call it
instead of repeating the code.  There is the additional overhead of a
function call, but this could be avoided if it comes down to it by
making it in-line.  And this only happens when upper-casing y with
diaresis, and the micro sign

12 years agoembed.fnc: Make _to_upper_title_latin1() avail to pp.c
Karl Williamson [Fri, 11 Nov 2011 18:03:35 +0000 (11:03 -0700)]
embed.fnc: Make _to_upper_title_latin1() avail to pp.c

If something like this were to be made more generally available, it
would be better to have two in-line functions, to_upper_latin1() and
to_title_latin1() that just call this underlying one with the correct
final parameter.

12 years agopp.c: White-space only
Karl Williamson [Fri, 11 Nov 2011 17:45:27 +0000 (10:45 -0700)]
pp.c: White-space only

This outdents and reflows comments as a result of the removal of a
surrounding block

12 years agopp.c: Call subroutine instead of repeat code
Karl Williamson [Fri, 11 Nov 2011 17:42:13 +0000 (10:42 -0700)]
pp.c: Call subroutine instead of repeat code

Now that toLOWER_utf8() and toTITLE_utf8() have the intelligence to skip
going out to swashes for Latin1 code points, it's not so critical to
bypass calling them for these (for speed).  It simplifies things not to
have the intelligence repeated.  There is the additional overhead of two
function calls (minus the branches saved), but these could be avoided if
it comes down to it by making them in-line.

12 years agopp.c: White-space only
Karl Williamson [Fri, 11 Nov 2011 17:38:27 +0000 (10:38 -0700)]
pp.c: White-space only

This outdents and reflows comments as a result of the removal of a
surrounding block

12 years agopp.c: Call subroutine instead of repeat code
Karl Williamson [Fri, 11 Nov 2011 17:28:44 +0000 (10:28 -0700)]
pp.c: Call subroutine instead of repeat code

Now that toUPPER_utf8() has the intelligence to skip going out to
swashes for Latin1 code points, it's not so critical to bypass calling
it for these (for speed).  It simplifies things not to have the
intelligence repeated.  There is the additional overhead of two function
calls (minus the branches saved), but these could be avoided if it comes
down to it by making them in-line.

12 years agopp.c: Add compiler hint
Karl Williamson [Fri, 11 Nov 2011 17:22:48 +0000 (10:22 -0700)]
pp.c: Add compiler hint

Almost always the input to uc() will be one of the other 253 Latin1
characters rather than one of the three that gets here.

12 years agopp.c: White-space only
Karl Williamson [Fri, 11 Nov 2011 17:13:28 +0000 (10:13 -0700)]
pp.c: White-space only

This outdents and reflows comments as a result of the removal of a
surrounding block

12 years agopp.c: Call subroutine instead of repeat code
Karl Williamson [Fri, 11 Nov 2011 17:06:11 +0000 (10:06 -0700)]
pp.c: Call subroutine instead of repeat code

Now that toLOWER_utf8() has the intelligence to skip going out to
swashes for Latin1 code points, it's not so critical to bypass calling
it for these (for speed).  It simplifies things not to have the
intelligence repeated.  There is the additional overhead of two function
calls (minus the branches saved), but these could be avoided if it comes
down to it by making them in-line.

12 years agoutf8.c: Add compiler hint
Karl Williamson [Fri, 11 Nov 2011 16:29:09 +0000 (09:29 -0700)]
utf8.c: Add compiler hint

It's very rare that someone will be outputting these unusual code points

12 years agoutf8.c: Add and revise comments
Karl Williamson [Fri, 11 Nov 2011 16:28:11 +0000 (09:28 -0700)]
utf8.c: Add and revise comments

I now understand swashes enough to document them better; nits in other
comments

12 years agoRe-order intrpvar.h to avoid false warnings about holes.
Nicholas Clark [Fri, 11 Nov 2011 13:54:27 +0000 (14:54 +0100)]
Re-order intrpvar.h to avoid false warnings about holes.

Under the default configuration options for ithreads on x86_64 *nix,
PERL_IMPLICIT_CONTEXT is defined. The variables specific to this are at the
end of the interpreter struct, and their size is not an integer multiple of
its alignment constraint. Hence there will always be a "hole". Move the
"hole" so that it is beyond the end of the structure. This avoids the Linux
tool "pahole", used for finding wasted space, from a false positive report
of a hole that can't be avoided.

12 years agoRe-order intrpvar.h to avoid holes in the interpreter struct.
Nicholas Clark [Fri, 11 Nov 2011 12:22:07 +0000 (13:22 +0100)]
Re-order intrpvar.h to avoid holes in the interpreter struct.

Because commit 45d91b83242e0418 needed to change a buffer size in a
per-thread variable, it created a hole in the ithreads interpreter struct,
as structure members after the buffer must be word aligned.

Re-order various structure members to avoid the hole.

12 years agopodcheck.t: Add comment
Karl Williamson [Fri, 11 Nov 2011 03:58:48 +0000 (20:58 -0700)]
podcheck.t: Add comment

This is in response to Tony Cook's noticing that the sort order changed,
but the data file was left in the old order.  The next time someone
changed things and did a regen, it got sorted, but the git diff showed
more changes, as a result, than there actually were in that commit.

12 years agoperlunicode: Document that \p{user-defined} can match abvoe Unicode
Karl Williamson [Fri, 11 Nov 2011 03:31:51 +0000 (20:31 -0700)]
perlunicode: Document that \p{user-defined} can match abvoe Unicode

12 years agoutf8.c: Don't warn on \p{user-defined} for above-Unicode
Karl Williamson [Fri, 11 Nov 2011 03:30:02 +0000 (20:30 -0700)]
utf8.c: Don't warn on \p{user-defined} for above-Unicode

Perl has allowed user-defined properties to match above-Unicode code
points, while falsely warning that it doesn't.  This removes that
warning.