This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
11 years agoAdd &CORE::prototype
Father Chrysostomos [Mon, 30 Apr 2012 15:49:32 +0000 (08:49 -0700)]
Add &CORE::prototype

11 years agoAdd &CORE::pos
Father Chrysostomos [Mon, 30 Apr 2012 04:15:25 +0000 (21:15 -0700)]
Add &CORE::pos

11 years agoMake pos use ck_fun and OA_SCALARREF
Father Chrysostomos [Sun, 13 May 2012 05:30:06 +0000 (22:30 -0700)]
Make pos use ck_fun and OA_SCALARREF

See the previous commit.  The same applies here.

In short, this allows core_prototype and pp_coreargs to be simpler.

11 years agoMake undef use ck_fun and OA_SCALARREF
Father Chrysostomos [Sat, 12 May 2012 21:25:44 +0000 (14:25 -0700)]
Make undef use ck_fun and OA_SCALARREF

In regen/opcodes, we have some operators that use ck_fun and have R
for the argument.  And there are some that use ck_lfun and have S for
the argument.

These both amount to more or less the same thing.

ck_fun/R goes through the OA_SCALARREF case in ck_fun, which calls
op_lvalue(scalar()) on the child op.

ck_lfun/S goes through the OA_SCALAR case in ck_fun, which calls
scalar(), and then ck_lfun sees to it that op_lvalue is called.

The only real difference is that the OA_SCALAR case makes sure there
are not too many arguments.

Since both core_prototype and pp_coreargs need special cases to deal
with OA_SCALAR that is really ‘supposed’ to be OA_SCALARREF, it
becomes simpler to add &CORE::undef if undef uses R.  In that case,
we also have to put the argument-checking in the OA_SCALARREF, but we
make it conditional on the op being an undef op, for the sake of doing
one thing at a time.  (This is a bit of a mess; see ticket #96006.)

11 years agoAdd &CORE::glob
Father Chrysostomos [Mon, 30 Apr 2012 00:58:44 +0000 (17:58 -0700)]
Add &CORE::glob

I added a special case for OP_GLOB to pp_coreargs, since glob does not
have the u flag in regen/opcodes; hence PL_opargs[opnum] & OA_DEFGV is
false, even though glob does imply $_.

Adding the flag to regen/opcodes is not so simple, as the code in
ck_fun that adds the DEFSV op does not account for list ops, but
leaves op_last unchanged.

Changing ck_fun to account requires adding more code than this special
case in pp_coreargs.

OPf_SPECIAL indicates that glob was called with the CORE:: prefix.

11 years agopp.c:pp_coreargs: use PL_op_desc instead of OP_DESC
Father Chrysostomos [Sat, 12 May 2012 04:48:58 +0000 (21:48 -0700)]
pp.c:pp_coreargs: use PL_op_desc instead of OP_DESC

Instead of using OP_DESC on op_next, since we already know the op
number, we can just go straight to PL_op_desc, which is what OP_DESC
itself uses after looking inside op_next to find out what the op
number is.

BTW, &CORE::scalar will need this, since a scalar op is never actu-
ally executed, making coreargs’ op_next pointer point to another op
than expected:

2  <1> leavesublv[1 ref] K/REFC,1 ->(end)
-     <1> scalar sKP/1 ->2
1        <$> coreargs(IV 2) s ->2
-e syntax OK

Otherwise we get ‘Not enough arguments for lvalue subroutine return’.

11 years agoAdd &CORE::exists
Father Chrysostomos [Fri, 27 Apr 2012 16:53:16 +0000 (09:53 -0700)]
Add &CORE::exists

11 years agoAdd &CORE::delete
Father Chrysostomos [Fri, 27 Apr 2012 03:40:48 +0000 (20:40 -0700)]
Add &CORE::delete

11 years agoAdd &CORE::defined
Father Chrysostomos [Fri, 27 Apr 2012 03:38:37 +0000 (20:38 -0700)]
Add &CORE::defined

11 years agocoresubs.t: Explicitly skip all unsupported keywords
Father Chrysostomos [Fri, 27 Apr 2012 03:36:03 +0000 (20:36 -0700)]
coresubs.t: Explicitly skip all unsupported keywords

Instead of skipping positive keywords (those that cannot be over-
ridden) because of their positivity, list them explicitly in the
skip list.

This will allow them to be removed one by one.

11 years agocoreamp.t: Explicitly skip all unsupported keywords
Father Chrysostomos [Fri, 27 Apr 2012 03:31:22 +0000 (20:31 -0700)]
coreamp.t: Explicitly skip all unsupported keywords

Instead of skipping positive keywords (those that cannot be over-
ridden) because of their positivity, list them explicitly in the
skip list.

This will allow them to be removed one by one.

11 years agogv.c: List all keywords with no coresubs
Father Chrysostomos [Fri, 27 Apr 2012 00:56:46 +0000 (17:56 -0700)]
gv.c: List all keywords with no coresubs

S_maybe_add_coresub returns NULL for any keywords that are not
overridable.

Instead of identifying them by the positivity of their codes, list
them all explicitly.

This will allow coresubs to be added for them one by one.

11 years agoUpdate perlfunc/prototype
Father Chrysostomos [Tue, 24 Apr 2012 05:55:48 +0000 (22:55 -0700)]
Update perlfunc/prototype

to account for the new inconsequentiality of non-overridability.

11 years agoAdd protos for positive keywords
Father Chrysostomos [Sat, 21 Apr 2012 19:50:25 +0000 (12:50 -0700)]
Add protos for positive keywords

‘Positive’ means having a + before it in regen/keywords.pl; i.e., key-
words that cannot be overridden.

Since all keywords are going to be added as subs to the CORE:: name-
space, with prototypes wherever they can apply, it makes sense to
return prototypes for all that can have them, which turns out to be
only a handful.

11 years agoCast exception handler in dl_vms.xs.
Craig A. Berry [Mon, 28 May 2012 21:10:57 +0000 (16:10 -0500)]
Cast exception handler in dl_vms.xs.

C++ needs an explicit type on the handler.

11 years agoAdd test for [perl #113400]
Father Chrysostomos [Mon, 28 May 2012 16:11:44 +0000 (09:11 -0700)]
Add test for [perl #113400]

11 years agoperlfunc: two missing words
Father Chrysostomos [Sun, 27 May 2012 18:22:51 +0000 (11:22 -0700)]
perlfunc: two missing words

This odd sentence was introduced in 8f1da26d.

11 years agoperldelta for 2b42d7ed8
Tony Cook [Mon, 28 May 2012 13:59:20 +0000 (23:59 +1000)]
perldelta for 2b42d7ed8

11 years ago[perl #112272] return EEXIST on link() to an existing file
Tony Cook [Tue, 8 May 2012 06:42:19 +0000 (16:42 +1000)]
[perl #112272] return EEXIST on link() to an existing file

Also attempts to translate some other errors.

Unfortunately Microsoft don't document error codes.

11 years ago[perl #112272] test link()'s error returns (TODO)
Tony Cook [Mon, 7 May 2012 12:23:42 +0000 (22:23 +1000)]
[perl #112272] test link()'s error returns (TODO)

11 years agoRevert "fix [perl #76546] regex engine slowdown bug"
Yves Orton [Mon, 28 May 2012 08:58:06 +0000 (10:58 +0200)]
Revert "fix [perl #76546] regex engine slowdown bug"

This reverts commit dee29c6b5bec1d6e7fccc971e31113a5d7cee844.

    $ perl5.16.0 -e 'warn "t/bin/good.pl syntax OK\n" =~ /syntax OK\s+\z/si'
    1 at -e line 1.
    $ bleadperl -e 'warn "t/bin/good.pl syntax OK\n" =~ /syntax OK\s+\z/si'
    Warning: something's wrong at -e line 1.

Will fix properly later.

11 years agoUpdate checkAUTHORS.pl with missing author
Steve Hay [Mon, 28 May 2012 08:53:57 +0000 (09:53 +0100)]
Update checkAUTHORS.pl with missing author

11 years ago[perl #111798] ExtUtils-CBuilder looks for the manifest file in the wrong place
N/K [Mon, 28 May 2012 08:33:58 +0000 (09:33 +0100)]
[perl #111798] ExtUtils-CBuilder looks for the manifest file in the wrong place

Near the start of link(), $output gets set to a blib\arch\auto path.
A little later that gets copied into $spec{output}, but $spec{manifest}
is left unset so it gets set later to a $spec{builddir} path, which is
not what $spec{output} was set to earlier.
The manifest file is always created alongside the DLL, so the correct
fix is simply to append '.manifest' to the DLL path to find the manifest.
(EU-MM does that too.)

Patch taken from [cpan #35943] which reported the same problem. The other
concern raised there, about the VC version being checked to deduce the
existence of the manifest file rather than testing that directly, has
long since been incorporated already and also explains why this problem
has not been seen recently: the faulty attempt to embed the manifest has
not been attempted ever since the existence test was added because it was
also failing and hence no 'mt' command was being run. [cpan #35943] is
thus resolved by this change too.

Bump $VERSION in all ExtUtils::CBuilder files (to 0.280208) to keep them
all in sync as before.

11 years ago[perl #111782] ExtUtils-CBuilder on Windows does not embed manifests
Steve Hay [Mon, 28 May 2012 07:35:19 +0000 (08:35 +0100)]
[perl #111782] ExtUtils-CBuilder on Windows does not embed manifests

Correct the test for the existence of the manifest file.
Bump $VERSION in all ExtUtils::CBuilder files (to 0.280207) to keep them
all in sync, as is currently the case.

11 years agoSynchronise Module-CoreList in Maintainers.pl for v5.17.0 release
Chris 'BinGOs' Williams [Sun, 27 May 2012 21:35:02 +0000 (22:35 +0100)]
Synchronise Module-CoreList in Maintainers.pl for v5.17.0 release

11 years agoupdate release schedule; 5.17.3 is Steve Hay
Ricardo Signes [Sun, 27 May 2012 13:32:27 +0000 (09:32 -0400)]
update release schedule; 5.17.3 is Steve Hay

11 years agofix [perl #76546] regex engine slowdown bug
Yves Orton [Sun, 22 Apr 2012 13:58:32 +0000 (15:58 +0200)]
fix [perl #76546] regex engine slowdown bug

11 years agoAdd missing author for 5.11.2 epigraph
Breno G. de Oliveira [Fri, 25 May 2012 13:44:47 +0000 (10:44 -0300)]
Add missing author for 5.11.2 epigraph

11 years agoFix for [perl #9423] vec assignments generate 2 warnings
Brian Fraser [Sat, 26 May 2012 20:35:26 +0000 (17:35 -0300)]
Fix for [perl #9423] vec assignments generate 2 warnings

Before this commit, this:

    vec(my $v,0,1) = 1;

would've produced four warnings about uninitialized values;
however, the ticket argued that these were spurious.

This commit removes the warning in the case of lvalue vec, since it is
similar to |=, but leaves it in place for rvalue vec.

11 years agosv.c: Make sv_pvn_force_flags guard against SV_UNDEF_RETURNS_NULL.
Brian Fraser [Sat, 26 May 2012 01:30:02 +0000 (22:30 -0300)]
sv.c: Make sv_pvn_force_flags guard against SV_UNDEF_RETURNS_NULL.

Previously, if SV_UNDEF_RETURNS_NULL was passed to sv_pvn_force_flags,
it would call sv_2pv_flags with that flag, and get back a NULL instead
of a char *, which lead to issues.
This commit makes sv_pvn_force_flags use an empty string in that case.

11 years agoCPAN's Term::ReadLine has been synchronised
Florian Ragwitz [Mon, 26 Mar 2012 12:51:50 +0000 (14:51 +0200)]
CPAN's Term::ReadLine has been synchronised

11 years agoFile::Spec::Unix: Fix pod link
Father Chrysostomos [Sat, 26 May 2012 21:12:56 +0000 (14:12 -0700)]
File::Spec::Unix: Fix pod link

11 years agoAdd Volker Schatz to AUTHORS
Father Chrysostomos [Sat, 26 May 2012 20:31:30 +0000 (13:31 -0700)]
Add Volker Schatz to AUTHORS

11 years agoIncrease $File::Spec::Unix::VERSION to 3.39_03
Father Chrysostomos [Sat, 26 May 2012 20:30:36 +0000 (13:30 -0700)]
Increase $File::Spec::Unix::VERSION to 3.39_03

11 years agoTests for perl #111510
Volker Schatz [Sat, 26 May 2012 20:29:54 +0000 (13:29 -0700)]
Tests for perl #111510

11 years ago[perl #111510] File::Spec::UNIX->abs2rel() gets it wrong with ".." components
Volker Schatz [Sat, 26 May 2012 19:32:25 +0000 (12:32 -0700)]
[perl #111510] File::Spec::UNIX->abs2rel() gets it wrong with ".." components

File::Spec::UNIX->abs2rel() returns wrong results in a few cases, most
of which involve ".." path components.

To reproduce, paste the following test cases into:
perl -MFile::Spec::Unix -n -e 'print File::Spec::Unix->abs2rel(split),"\n";'

../foo bar/bat
bar/bat ../foo
foo bar/../bat
. .
/ /

Correct results when run at /home/me and no symlinks in base path:
../../../foo
../me/bar/bat
../foo
.
.

Results for File::Spec::Unix from PathTols 3.33:
../../foo
../bar/bat
../../../foo
/
/

The error in the first test case is due to an optimisation applied when
both arguments are relative paths, which prepends "/" instead of the
current directory.  "/../" is then converted to "/" by canonpath().

I have replaced this optimisation by a single call to _cwd() in the
following patch.  This also fixes the fourth test case.  Besides, I have
moved checks which make sense only for absolute path arguments to the
first branch of the if.

(hunk @@ -366,28 +367,32 @@)

The error in the last test case arises because a root dir $base is
treated specially, and catdir() does not work well for fewer than two
path components. The first added line in the following patch catches that.

As regards the second and third test case, they can be solved without
consulting the filesystem only if no symlinks are involved.  Whereever
$path contains .. components, the corresponding directory has to be
descended into. The following patch does this.

(hunk @@ -395,19 +400,39 @@)

It can be impossible for abs2rel() to work correctly without looking at
the filesystem if $base contains symlinks.  I understand from the
documentation that the File::Spec modules are not meant to consult the
filesystem.  Even though the docs state that abs2rel() does not consult
the filesystem, the implications could perhaps be made clearer, for
example like this:

(hunk @@ -352,9 +352,10 @@)

11 years agorewrite installhtml's installdir dir scan logic
Aristotle Pagaltzis [Tue, 15 May 2012 16:59:33 +0000 (18:59 +0200)]
rewrite installhtml's installdir dir scan logic

The code so far was riddled with copy-paste and hacks and incurred
redundant effort, including syscalls. Replaced with a skimmable and
parsimonious implementation.

11 years agoturn some quasi-declarations into real inline ones
Aristotle Pagaltzis [Wed, 16 May 2012 02:47:29 +0000 (04:47 +0200)]
turn some quasi-declarations into real inline ones

11 years agoswitch installhtml from File::Spec to ::Functions
Aristotle Pagaltzis [Tue, 15 May 2012 16:59:31 +0000 (18:59 +0200)]
switch installhtml from File::Spec to ::Functions

The plan in the next commits is to use C<no_upwards> from File:::Spec to
be explicit about intent -- imported using File::Spec::Function to avoid
the ugly File::Spec class method calling convention. This patch would be
frivolous otherwise, but given the occasion we might as well make things
consistent.

11 years agorecord some more release volunteers
Ricardo Signes [Sat, 26 May 2012 17:44:26 +0000 (13:44 -0400)]
record some more release volunteers

11 years agonote that there is another file to edit on perlweb
Ricardo Signes [Sat, 26 May 2012 17:22:09 +0000 (13:22 -0400)]
note that there is another file to edit on perlweb

11 years agolink to 5.17.0 release announcement
Zefram [Sat, 26 May 2012 16:57:51 +0000 (17:57 +0100)]
link to 5.17.0 release announcement

11 years agonew perldelta
Zefram [Sat, 26 May 2012 16:38:31 +0000 (17:38 +0100)]
new perldelta

11 years agoepigraph for 5.17.0
Zefram [Sat, 26 May 2012 16:19:36 +0000 (17:19 +0100)]
epigraph for 5.17.0

11 years agofix perlhist entry for 5.16.0 v5.17.0
Zefram [Sat, 26 May 2012 14:06:57 +0000 (15:06 +0100)]
fix perlhist entry for 5.16.0

11 years agoadd new release to perlhist
Zefram [Sat, 26 May 2012 14:05:01 +0000 (15:05 +0100)]
add new release to perlhist

11 years agoupdate Module::CoreList for 5.17.0
Zefram [Sat, 26 May 2012 14:03:04 +0000 (15:03 +0100)]
update Module::CoreList for 5.17.0

11 years agonote Module::CoreList issue with .0 versions
Zefram [Sat, 26 May 2012 14:01:51 +0000 (15:01 +0100)]
note Module::CoreList issue with .0 versions

11 years agohandle hash form of bugtracker resource data
Zefram [Sat, 26 May 2012 13:55:38 +0000 (14:55 +0100)]
handle hash form of bugtracker resource data

The format changed with version 2 of the META spec.

11 years agohandle JSON meta files on CPAN
Zefram [Sat, 26 May 2012 13:52:08 +0000 (14:52 +0100)]
handle JSON meta files on CPAN

11 years agofinalise perldelta
Zefram [Sat, 26 May 2012 12:40:28 +0000 (13:40 +0100)]
finalise perldelta

11 years agocorrect pluralisation for "1 week"
Zefram [Sat, 26 May 2012 12:34:20 +0000 (13:34 +0100)]
correct pluralisation for "1 week"

11 years agoTest case for [perl #9391]
Brian Fraser [Sat, 26 May 2012 00:46:19 +0000 (21:46 -0300)]
Test case for [perl #9391]

11 years ago__DECCXX usually should do what __DECC does.
Craig A. Berry [Fri, 25 May 2012 22:56:55 +0000 (17:56 -0500)]
__DECCXX usually should do what __DECC does.

Unless __DECC was meant as the opposite of VAX C, which is not
C89-compliant and cannot build Perl.

11 years agoFix varying string struct for VMS's home-grown glob.
Craig A. Berry [Fri, 25 May 2012 22:16:20 +0000 (17:16 -0500)]
Fix varying string struct for VMS's home-grown glob.

We were only using 4K, not 64K, and we were requesting longword
alignment but not providing a struct size that was a multiple of 4.

11 years agoremove deprecated qw-as-parens behaviour
Zefram [Fri, 25 May 2012 21:25:21 +0000 (22:25 +0100)]
remove deprecated qw-as-parens behaviour

11 years agoBlock signals during fork (fixes RT#82580)
Leon Timmermans [Tue, 22 May 2012 14:58:26 +0000 (16:58 +0200)]
Block signals during fork (fixes RT#82580)

11 years agofix comparative Perl version numbers
Zefram [Fri, 25 May 2012 20:19:20 +0000 (21:19 +0100)]
fix comparative Perl version numbers

11 years agoperldelta updates
Zefram [Fri, 25 May 2012 19:07:35 +0000 (20:07 +0100)]
perldelta updates

11 years agoperldelta updates
Zefram [Fri, 25 May 2012 17:56:45 +0000 (18:56 +0100)]
perldelta updates

11 years agoAccumulate access warnings in stat.t.
Craig A. Berry [Fri, 25 May 2012 16:29:05 +0000 (11:29 -0500)]
Accumulate access warnings in stat.t.

On VMS, there is an additional warning that causes the warning of
interest to be lost and the test to fail.  So append each warning
as we see it and then we'll find the access warning we're testing
for as long as it's in there somewhere.

11 years agoperldelta updates
Zefram [Fri, 25 May 2012 16:24:12 +0000 (17:24 +0100)]
perldelta updates

11 years agocorrect schedule for 5.17.0 release
Zefram [Fri, 25 May 2012 16:23:48 +0000 (17:23 +0100)]
correct schedule for 5.17.0 release

11 years agoperldelta updates
Father Chrysostomos [Fri, 25 May 2012 16:12:30 +0000 (09:12 -0700)]
perldelta updates

11 years agoFix for [perl #8931], call magic only once for join's first arg.
Brian Fraser [Fri, 25 May 2012 05:44:20 +0000 (02:44 -0300)]
Fix for [perl #8931], call magic only once for join's first arg.

11 years agoDeprecate literal unescaped "{" in regexes.
Karl Williamson [Fri, 25 May 2012 03:23:49 +0000 (21:23 -0600)]
Deprecate literal unescaped "{" in regexes.

We are deprecating literal left braces in regular expressions.  The 5.16
delta announced that this is coming.

This commit causes a warning to be raised when a literal "{" is
encountered.  However, it does not do this if the left brace is at the
beginning of a construct.  Such a brace does not cause problems for us
for our future use of it for other purposes, as, for example in things
like \b{w}, and there were a large number of core tests that failed
without this condition.

I didn't mention this exception in the diagnostic.  We may choose to
forbid it everywhere, and we certainly want to discourage its use
everywhere.  But this commit gets the essential components in early in
5.17, and we can tighten it up later if we decide to.

11 years agoutf8.pm: pod: grammar, clarify
Karl Williamson [Thu, 24 May 2012 17:49:31 +0000 (11:49 -0600)]
utf8.pm: pod: grammar, clarify

11 years agoFix a cast in vms/vms.c.
Craig A. Berry [Fri, 25 May 2012 02:47:45 +0000 (21:47 -0500)]
Fix a cast in vms/vms.c.

This is a follow-up to c11536f52.  Oddly. C++ was ok without the
"struct" but C wasn't.

11 years agoadd Version::Requirements as a known linkable-to lib
Ricardo Signes [Fri, 25 May 2012 02:42:53 +0000 (22:42 -0400)]
add Version::Requirements as a known linkable-to lib

Otherwise, podcheck.t dies when we mention V::R in our perldelta!

11 years agoperldelta: Version::Requirements has been removed
Ricardo Signes [Fri, 25 May 2012 02:34:25 +0000 (22:34 -0400)]
perldelta: Version::Requirements has been removed

11 years agoRevert "t/porting/checkcase.t should skip directories"
Ricardo Signes [Fri, 25 May 2012 02:17:32 +0000 (22:17 -0400)]
Revert "t/porting/checkcase.t should skip directories"

This reverts commit f86fc3ff06fb5e5bae2719b5601eb7a094fe014b.

David and I had discussed this commit, along with some others on IRC,
and we felt the test was wrong and the commit was good.  Unfortunately,
problems were reported only later, after Version-Requirements had
entered the core, so undoing the test would have required an
exception be made for lib/Version and lib/version conflicting.

Now that Version-Requirements has left the core, this test can be
restored.

11 years agoremove Version-Requirements from core!
Ricardo Signes [Fri, 25 May 2012 02:06:45 +0000 (22:06 -0400)]
remove Version-Requirements from core!

It has been replaced by CPAN::Meta::Requirements, which is just the
same code, renamed.

It was renamed (and now removed) to avoid conflicts on case-sensitive
filesystems between version::Internals and Version::Requirements.

11 years agoMake configure.com ready for C++.
Craig A. Berry [Fri, 25 May 2012 00:01:16 +0000 (19:01 -0500)]
Make configure.com ready for C++.

Building on Peter Prymmer's work from some years ago, this gets
the configuration process on VMS up to speed on the native C++
compiler.  Quite a bit of it involves tweaking the configuration
probes to work under C++, plus a variety of other nits.

TODO:  This should probably be made to work as -Dcc=cxx rather
than -Dusecxx as it does now, but it's still pretty experimental.

11 years agoVMS C++ strerror prototype differences in perl.h.
Craig A. Berry [Thu, 24 May 2012 22:47:39 +0000 (17:47 -0500)]
VMS C++ strerror prototype differences in perl.h.

The funny extra arguments to strerror are only there on VMS
when compiling with C, not C++.

On VMS, DONT_DECLARE_STD is synonymous with defined(__cplusplus).

11 years agoFile scope for VMS-specific #includes.
Craig A. Berry [Thu, 24 May 2012 22:13:13 +0000 (17:13 -0500)]
File scope for VMS-specific #includes.

C++ requires #include directives to be at file scope, but we've
been lazy and haven't been doing that.

11 years agoC++ification for vms/vmsish.h.
Craig A. Berry [Thu, 24 May 2012 21:58:22 +0000 (16:58 -0500)]
C++ification for vms/vmsish.h.

Its prototypes need extern "C" and the compiler messages that
cause trouble with DEC/Compaq/HP C++ are different from the ones
that cause trouble with C.

11 years agoFix up vms/vms.c for C++.
Craig A. Berry [Thu, 24 May 2012 21:54:28 +0000 (16:54 -0500)]
Fix up vms/vms.c for C++.

Almost all of this consists of casting the return values from
PerlMem_malloc, which inexpicably we weren't doing.

There are also some prototypes that have to be at file scope and
declare with extern "C".

And there was some embarrassing dead code in Perl_my_localtime
that the C++ compiler spotted.

11 years agoUse the (START|END)_EXTERN_C macros.
Craig A. Berry [Thu, 24 May 2012 18:35:34 +0000 (13:35 -0500)]
Use the (START|END)_EXTERN_C macros.

We seem to use them everywhere else in core.

11 years agohandy.h: Fix definition of isOCTAL_A()
Karl Williamson [Thu, 24 May 2012 17:18:03 +0000 (11:18 -0600)]
handy.h: Fix definition of isOCTAL_A()

Commit  c2da0b36ccf7393a329af732fac4153ddf6ab42e changed this macro, and
created a syntax error.  But it turns out that there were no current
calls to it in the Perl core.  When I tried adding one, it showed the
failure.

11 years agoThe reentrant API should always have prototypes.
Craig A. Berry [Sun, 6 May 2012 20:09:07 +0000 (15:09 -0500)]
The reentrant API should always have prototypes.

reentr.c always defines and exports its functions even when
USE_REENTRANT_API is not defined (though they'll be empty functions
in that case).  In general we shouldn't be exporting functions
without providing prototypes for them, but specifically, when
compiling with C++, the prototype-less functions get their names
mangled.  So the purpose of defining the functions when we aren't
using them (to have a consistent API) is defeated because no one
looking for those functions under their proper names would be able
to find them.

So this makes us stop hiding the prototypes when USE_REENTRANT_API
is not defined.

11 years agoUnmangle mathoms under C++.
Craig A. Berry [Sun, 6 May 2012 13:50:43 +0000 (08:50 -0500)]
Unmangle mathoms under C++.

In order to actually provide binary compatibility, we have to
serve up these functions under the names they were known by
before making their way into mathoms.c.  We've always done that
under C, but not C++.

11 years ago[perl #112786] Fix build under clang++
Craig A. Berry [Thu, 24 May 2012 07:54:57 +0000 (00:54 -0700)]
[perl #112786] Fix build under clang++

A line of code in sv.c last modified at
<http://perl5.git.perl.org/perl.git/commit/c6fb3f6e3e5160581b7?f=sv.c>
causes clang++ to fall down hard when building blead:

sv.c:13969:32: error: unexpected ':' in nested name specifier
        CV * const cv = gv ? (CV *)gv : find_runcv(NULL);
                                      ^
                                      ::
sv.c:13969:34: error: no member named 'Perl_find_runcv' in 'gv'
        CV * const cv = gv ? (CV *)gv : find_runcv(NULL);
                                   ~~~~ ^
./embed.h:137:24: note: expanded from macro 'find_runcv'
#define find_runcv(a)           Perl_find_runcv(aTHX_ a)
                                ^
sv.c:13969:50: error: expected ':'
        CV * const cv = gv ? (CV *)gv : find_runcv(NULL);
                                                        ^
                                                        :
sv.c:13969:21: note: to match this '?'
        CV * const cv = gv ? (CV *)gv : find_runcv(NULL);
                           ^
sv.c:13969:50: error: expected expression
        CV * const cv = gv ? (CV *)gv : find_runcv(NULL);
                                                        ^
14 warnings and 4 errors generated.
make: *** [sv.o] Error 1

clang++ seems to need only an extra set of parentheses to calm down
and let go of its anxieties.

[Committer’s note: Leon Timmermans points out that it's struct gv
that's confusing clang++.  So a struct name used as a variable cannot
be followed by a colon.]

11 years agoAdd perldelta for Unicode CCC132 fix
Karl Williamson [Thu, 24 May 2012 02:30:17 +0000 (20:30 -0600)]
Add perldelta for Unicode CCC132 fix

11 years agoAdd another address for Ronald Kimball to checkAUTHORS.pl
Father Chrysostomos [Thu, 24 May 2012 01:19:56 +0000 (18:19 -0700)]
Add another address for Ronald Kimball to checkAUTHORS.pl

11 years ago[perl #112604] perlre man page contains suspect example of recursion
Ronald J Kimball [Thu, 24 May 2012 01:17:16 +0000 (18:17 -0700)]
[perl #112604] perlre man page contains suspect example of recursion

Jim Avera wrote:
> This seems incorrect because the \s++ eats all white space without
> backtracking, preventing the following \s+ from matching.
> Thus the pattern always fails for any input.

It should be \s+ \+ \s+

11 years ago[perl #112522] Mildly incorrect wording in "perldoc perlre"
Aristotle Pagaltzis [Thu, 24 May 2012 01:12:43 +0000 (18:12 -0700)]
[perl #112522] Mildly incorrect wording in "perldoc perlre"

11 years ago[perl #60204] Unhelpful error message from unpack
Marcus Holland-Moritz [Wed, 23 May 2012 21:50:31 +0000 (14:50 -0700)]
[perl #60204] Unhelpful error message from unpack

Nigel Sandever said:
> The error message produced by the following snippets is very unhelpful:
>
> c:\>perl -wle"print unpack 'v/a*', qq[a]"
> '/' must follow a numeric type in unpack at -e line 1.
>
> c:\>perl -wle"print unpack 'v/a*', ''"
> '/' must follow a numeric type in unpack at -e line 1.
>
> c:\>perl -wle"print unpack 'v/a*', ' '"
> '/' must follow a numeric type in unpack at -e line 1.

The "problem" is that the data string is too short. But
unpack doesn't generate a warning (or croak) in this case
for simple patterns:

mhx@r2d2 $ perl -MData::Dumper -we'print Dumper([unpack "n", "a"])'
$VAR1 = [];

So, I'd say your code should just behave in exactly the
same way. No warning, no return values.

11 years agoCorrect perldelta entry for fallback entry
Father Chrysostomos [Wed, 23 May 2012 20:42:09 +0000 (13:42 -0700)]
Correct perldelta entry for fallback entry

11 years agoperldelta for PL_amagic_generation removal
Father Chrysostomos [Wed, 23 May 2012 20:17:17 +0000 (13:17 -0700)]
perldelta for PL_amagic_generation removal

11 years agomktables: Handle typo in Unicode 6.1 data file
Karl Williamson [Wed, 23 May 2012 23:14:36 +0000 (17:14 -0600)]
mktables: Handle typo in Unicode 6.1 data file

Unicode has published a correction to their data files for version 6.1.
This patch applies that correction.

11 years agoRevert "Fix mktables bug due to the previous overload fix"
Karl Williamson [Wed, 23 May 2012 23:01:11 +0000 (17:01 -0600)]
Revert "Fix mktables bug due to the previous overload fix"

mktables had unknowingly been relying on a bug in the overloading code.
That bug was fixed by commit f041cf0f9c6469c41de8b73d5f7b426710c3ff8b.
Commit 5f9f83be9cdcd54449f7f40db078fe367d780475 is a minimal commit to
get mktables to pass its tests as a result of the fixed bug.  However,
it did not address the underlying problem, which doesn't show up in the
typical tests, but does occur when tracing is added or things go wrong
and mktables tries to output any of a number of messages, which fail
because there is no ".=" operator.  A previous commit added the proper
overloaded ".=", and so this one is no longer needed, and would be
confusing to someone who doesn't know the history.

11 years agomktables: Add sanity check
Karl Williamson [Thu, 19 Apr 2012 18:25:08 +0000 (12:25 -0600)]
mktables: Add sanity check

Since mktables works only on Unicode code points so far, a range outside
that space is probably erroneous.  Raise a warning

11 years agomktables: Add overloaded .=
Karl Williamson [Mon, 16 Apr 2012 17:32:43 +0000 (11:32 -0600)]
mktables: Add overloaded .=

This was automatically getting generated due to a bug in perl which
ignored fallback=>0, but that has been fixed by commit
f041cf0f9c6469c41de8b73d5f7b426710c3ff8b, so we have to have our own
operator.

11 years agomktables: Add error check
Karl Williamson [Mon, 16 Apr 2012 17:31:50 +0000 (11:31 -0600)]
mktables: Add error check

+= is not a commutative operator, and so the overloaded version should
not accept the parameters being swapped.

11 years agomktables: Add overloaded '+='
Karl Williamson [Mon, 16 Apr 2012 17:28:20 +0000 (11:28 -0600)]
mktables: Add overloaded '+='

This was automatically generated before, in spite of fallback => 0, but
that has now been fixed by commit
f041cf0f9c6469c41de8b73d5f7b426710c3ff8b.  However, that change caused
another overloaded += to be used with the parameters swapped, resulting
in the table generated for Gc=Cs (the surrogates) to be wrong.  This
creates the proper overload.

11 years agopodcheck.t: Try harder to avoid transitory failure
Karl Williamson [Tue, 27 Mar 2012 04:20:59 +0000 (22:20 -0600)]
podcheck.t: Try harder to avoid transitory failure

It may be that a file that looks like a pod is transitory.  podcheck.t
catches and handles some of these, but there are cases where it doesn't
catch these.  This commit adds code to try harder to detect such
instances and recover properly.

I know of two instances in the months since this code has been in
service where this has happened, so it's not a common occurrence, and
re-running it makes the failure go away.  Still, if it can be easily
avoided, do so.

11 years agopodcheck.t: Add label to 'next' stmts for clarity
Karl Williamson [Tue, 27 Mar 2012 04:18:01 +0000 (22:18 -0600)]
podcheck.t: Add label to 'next' stmts for clarity

11 years agoMerge branch 'rgs/overload' into blead
Rafael Garcia-Suarez [Wed, 23 May 2012 13:53:31 +0000 (15:53 +0200)]
Merge branch 'rgs/overload' into blead

11 years ago[perl #113050] Put fallback back under "()"
Father Chrysostomos [Wed, 23 May 2012 08:05:20 +0000 (01:05 -0700)]
[perl #113050] Put fallback back under "()"

Unfortunately, there is code all over CPAN that assumes fallback is
stored under the "()" stash entry.  And that code also assumes that
the overloadedness flag (the existence of the CV) is in the same spot.
So much for encapsulation.

This commit changes overloading itself to use a different key, "((",
while having it search for "()" first, and then "((" only if "()" is
not found, to preserve compatibility with encapsulation-breaking code.

So the "((" key will only be used by gv.c if there is no fallback
value specified at all.

11 years agoIncrease $ExtUtils::ParseXS::Utilities::VERSION to 3.17
Father Chrysostomos [Wed, 23 May 2012 06:54:39 +0000 (23:54 -0700)]
Increase $ExtUtils::ParseXS::Utilities::VERSION to 3.17