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

(cherry picked from commit e46c382ee1a26c0abddc80ad1249dc544d229d4e)

10 years agoFollowing 33291, on VMS we need to use the same prototypes other platforms
Craig A. Berry [Fri, 22 Feb 2008 00:20:45 +0000 (00:20 +0000)] 
Following 33291, on VMS we need to use the same prototypes other platforms
use in order to get the do_spawn-related assert macros defined.  Based
on suggestions by John Malmberg.

p4raw-id: //depot/perl@33343

(cherry picked from commit 9ec7171b93c2f7e007fcbb49144b664695f0d21b)

10 years agoUpgrade to IPC::SysV 2.00_02
Marcus Holland-Moritz [Sat, 29 Nov 2008 05:43:24 +0000 (05:43 +0000)] 
Upgrade to IPC::SysV 2.00_02

p4raw-id: //depot/perl@34953

(cherry picked from commit 503ba33a32294abe4e07fa9e519b91bcf80bf407)

10 years agoUpgrade to IPC::SysV 2.00_01
Marcus Holland-Moritz [Wed, 26 Nov 2008 22:34:54 +0000 (22:34 +0000)] 
Upgrade to IPC::SysV 2.00_01

p4raw-id: //depot/perl@34936

(cherry picked from commit aec08fdf1cbafdae7e2d5b94ea4ce3d52f2c4c72)

10 years agoRe: [PATCH] Exclude .svn and _darcs from IPC::SysV's Makefile.PL libscan
Marcus Holland-Moritz [Wed, 9 Jan 2008 19:58:11 +0000 (20:58 +0100)] 
Re: [PATCH] Exclude .svn and _darcs from IPC::SysV's Makefile.PL libscan
Message-ID: <20080109195811.2c5353e5@r2d2>

Make libscan() in IPC::SysV's Makefile.PL inherit EU::MM's
libscan() behaviour.

p4raw-id: //depot/perl@32926

(cherry picked from commit 3f163fbbebeeaba9ded4fcd6c8371584f6da43d5)

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 <>.

(cherry picked from commit 9c3905ef054a16857454499c7acfa64d8373c309)

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=`...`

(cherry picked from commit 28b1daef84496f2ebce3fad4ac7861dd4dd92f38)

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=`...`

(cherry picked from commit 050a6864ccd9ebde9d8e59e8575c3ba4ac7097d4)

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.

(cherry picked from commit d0a9311f604aa78fbd7b7284f993900eeb0c2a7e)

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 $()

(cherry picked from commit 5f589954180c59496f647c8523dcd3df0d8e579b)

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.

(cherry picked from commit a2837a9e92f4ea37fd2681a70558d242250a5a34)

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 ` .... `

(cherry picked from commit 8ffec826be729d9e6b57b1c75aba2efd9067825d)

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_ ...)  :-(

(cherry picked from commit 54bb77241e478a3cfef59931ff5bed2271662f23)

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 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

* 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 "lib/" and "unpushed.h", the former is used to make
git data available to without rebuilding everything else, and the
second is used to expose unpushed commits (if any) via the registered patch facility
of patchlevel.h

(cherry-picked from commit 46807d8e809cc127621bf85d9e9cea2f838eb477)

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

(cherry picked from commit 675b0f774d374f6951c02c6463c64a746ad46acd)

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

(cherry picked from commit 3eb629a04d2069448368e3c6c52aab75c686b6bb)

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.

(cherry picked from commit 9e1694326ed89111b35daf7589dacbe10253cdcd)

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

(cherry picked from commit 01c2a33d9c8801c319aa999a05dc0d7812571930)

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

Patch provided by Daniel Klein <danielklein-à> :

  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

(cherry picked from commit 39bcdda02ea582e7bdf8b0cf2e7186e89c6baea9)

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

Patch provided by Daniel Klein <danielklein-à> :

  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.

(cherry picked from commit 6a9befb105d93024902eb178dab77655333f1829)

10 years 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)] doesn't appear to support plain arrays and hashes in case().

(cherry picked from commit cd3d9d47255d3080961ba7b58c9a145c7b45b905)

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.

(cherry picked from commit b62fb10ea98565ce5572416500e1e3517cb17d33)

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

(cherry picked from commit fc0bcb62b85d01e88e3b64c381528a3ea82ead30)

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.

(Cherry-picked from commit 5844ac76c26b089bf113b64f4251a673b59bdebb)

10 years agoBreak out the set-the-MRO logic from the XS_mro_set_mro into Perl_mro_set_mro(),
Nicholas Clark [Sat, 27 Dec 2008 14:32:59 +0000 (14:32 +0000)] 
Break out the set-the-MRO logic from the XS_mro_set_mro into Perl_mro_set_mro(),
which can be called from C code (such as the guts of extensions).

(cherry picked from commit 31b9005d8ff165a414c5e3493027e1656d7e810f)

10 years agoOptimisation of the use of the meta structure - don't create a hash if all we
Nicholas Clark [Sat, 27 Dec 2008 09:20:21 +0000 (09:20 +0000)] 
Optimisation of the use of the meta structure - don't create a hash if all we
are dealing with is data for the current MRO. Instead the direct pointer "owns"
the (reference to the) data, with the hash pointer left as NULL to signal this.

(cherry picked from commit 553e831a35acc518a30a7514866e0d1440e894ef)

10 years agoRemove the comment that the mro:: functions are actually in the core
Nicholas Clark [Sat, 27 Dec 2008 08:39:14 +0000 (08:39 +0000)] 
Remove the comment that the mro:: functions are actually in the core
interpreter, hence you don't actually need to use mro;
This should have remained an implementation detail, as it limits the scope to
move things around within a stable branch. So for now, remove the expectation.

(cherry picked from commit 58d4c5dfb9bcf0d0f30468212e01c1f9c9d48ce3)

10 years agoProper pluggable Method Resolution Orders. 'c3' is now implemented outside the
Nicholas Clark [Sat, 27 Dec 2008 00:20:35 +0000 (00:20 +0000)] 
Proper pluggable Method Resolution Orders. 'c3' is now implemented outside the
core, in ext/mro/mro.xs. Also move mro::_nextcan() to mro.xs. It needs direct
access to S_mro_get_linear_isa_c3(), and nothing on CPAN calls it, except via
methods defined in Hence all users already require mro;

(cherry picked from commit b2685f0c86badfc357584d8dbfb2bf17057ea226)

10 years agoExplictly export Perl_mro_meta_init() so that HvMROMETA() can become part of the
Nicholas Clark [Fri, 26 Dec 2008 21:31:47 +0000 (21:31 +0000)] 
Explictly export Perl_mro_meta_init() so that HvMROMETA() can become part of the
public API and be used outside the core. However, leave Perl_mro_meta_init() as
a private implementation detail.

(cherry picked from commit c60bad7b8870cf2745c93e1b99cbb504daa780b2)

10 years agoAdd Perl_mro_register() to register Method Resolution Orders,
Nicholas Clark [Fri, 26 Dec 2008 18:26:53 +0000 (18:26 +0000)] 
Add Perl_mro_register() to register Method Resolution Orders,
Perl_mro_get_from_name() to retrieve MROs by name, and PL_registered_mros to
store them in. Abolish the static array of mros, and instead register the dfs
and c3 MRO structures.

(cherry picked from commit a3e6e81e81213c31f0612471c427044481a95287)

10 years agoAdd MRO_GET_PRIVATE_DATA() to use the cached mro private data where possible.
Nicholas Clark [Fri, 26 Dec 2008 17:14:44 +0000 (17:14 +0000)] 
Add MRO_GET_PRIVATE_DATA() to use the cached mro private data where possible.

(cherry picked from commit 123892d916359369839f3896f283189be71dc32c)

10 years agoRepurpose struct mro_meta to allow it to store cached linear ISA for arbitary
Nicholas Clark [Fri, 26 Dec 2008 16:38:58 +0000 (16:38 +0000)] 
Repurpose struct mro_meta to allow it to store cached linear ISA for arbitary
method resolution orders.

mro_linear_dfs becomes a hash holding the different MROs' private data.
mro_linear_c3 becomes a shortcut pointer to the current MRO's private data.

(cherry picked from commit fa60396f123333e92849ecaecffb9252458d6678)

10 years agoSilence a compiler warning introduced by 34963
Steve Hay [Tue, 2 Dec 2008 17:47:19 +0000 (17:47 +0000)] 
Silence a compiler warning introduced by 34963

p4raw-id: //depot/perl@34982

(cherry picked from commit 4f5084fafb145bb35b8f361d4dab26b04511700d)

10 years agoConvention seems to be that static definitions are also made visible by
Nicholas Clark [Mon, 1 Dec 2008 21:28:13 +0000 (21:28 +0000)] 
Convention seems to be that static definitions are also made visible by
|| defined(PERL_DECL_PROT), so add this where it is missing.

p4raw-id: //depot/perl@34972

(cherry-picked from commit efd0b058b26702bef38cdb6ce1a9da02e3e7cf89,
althought many of the updates were skipped because the functions aren't
static in maint)

10 years agoIn Perl_ss_dup(), case SAVEt_FREEPV can be rolled into case
Nicholas Clark [Mon, 1 Dec 2008 13:20:27 +0000 (13:20 +0000)] 
In Perl_ss_dup(), case SAVEt_FREEPV can be rolled into case
SAVEt_DELETE for a space optimisation.

p4raw-id: //depot/perl@34969

(cherry picked from commit 8e41545fc5fd5bfd2ddf4723e7793ec207deefff)

10 years agoImplement Perl_save_delete() using save_pushptri32ptr().
Nicholas Clark [Mon, 1 Dec 2008 13:19:41 +0000 (13:19 +0000)] 
Implement Perl_save_delete() using save_pushptri32ptr().

p4raw-id: //depot/perl@34968

(cherry picked from commit 85a721ca70aa3423dbb60aac2a8755ab0fc07bbb)

10 years agoRe-order Perl_save_delete() to PTR, INT, PTR.
Nicholas Clark [Mon, 1 Dec 2008 11:54:42 +0000 (11:54 +0000)] 
Re-order Perl_save_delete() to PTR, INT, PTR.

p4raw-id: //depot/perl@34967

(cherry picked from commit 35d4f826f8e56c33d13476d0f2f79c923032b721)

10 years agoAdd S_save_pushptri32ptr() and use it to re-implement Perl_save_hints()
Nicholas Clark [Mon, 1 Dec 2008 11:27:31 +0000 (11:27 +0000)] 
Add S_save_pushptri32ptr() and use it to re-implement Perl_save_hints()
and Perl_save_aelem().

p4raw-id: //depot/perl@34966

(cherry-picked from commit be84297eef8d269e574a1aac0dbf18f3c3b7341d,
but skipped re-implementing Perl_save_hints since the push order is
different between bleed and maint)

10 years agoMove the implmentation of SAVEHINTS() into a new Perl_save_hints() in
Nicholas Clark [Mon, 1 Dec 2008 11:06:05 +0000 (11:06 +0000)] 
Move the implmentation of SAVEHINTS() into a new Perl_save_hints() in
scope.c. "Inlined" macro functions in scope.h are actually space

(cherry-picked from commit da8315f8f4d9d4df8cbebe108ef0ddb4795856d7,
but modified to allow for the fact that the body of SAVEHINTS()
hasn't been reordered by the blead-only commit 601cee3b44)

p4raw-id: //depot/perl@34965

10 years agoExpose save_pushi32ptr() and implement SAVECOPARYBASE() with it.
Nicholas Clark [Mon, 1 Dec 2008 09:46:15 +0000 (09:46 +0000)] 
Expose save_pushi32ptr() and implement SAVECOPARYBASE() with it.

p4raw-id: //depot/perl@34963

(cherry picked from commit 7623d4262995987d3de73f116de43554c077f9c7)

10 years agoExpose save_pushptrptr() and implement SAVESWITCHSTACK() with it.
Nicholas Clark [Mon, 1 Dec 2008 00:02:17 +0000 (00:02 +0000)] 
Expose save_pushptrptr() and implement SAVESWITCHSTACK() with it.

p4raw-id: //depot/perl@34960

(cherry picked from commit dfcd3de5defffbf214d60b8322b79ded8e367fd3)

10 years agoRefactor all of the code of the form
Nicholas Clark [Sun, 30 Nov 2008 23:45:20 +0000 (23:45 +0000)] 
Refactor all of the code of the form
into a static function S_save_pushi32ptr().

p4raw-id: //depot/perl@34959

(cherry picked from commit 1409bc0658469580630ba458c85fe9cc3cb2d78c)

10 years agoRe-implement the macros SAVECOMPPAD(), SAVECOMPILEWARNINGS(),
Nicholas Clark [Sun, 30 Nov 2008 23:27:57 +0000 (23:27 +0000)] 
SAVEPARSER() in terms of save_pushptr(). This shinks the exectuable
by about 4K. Maybe some of the other scope.h macros should become

p4raw-id: //depot/perl@34958

(cherry picked from commit 747e2fae43204b65ccf806e75ededd01638e4351)

10 years agoRefactor all of the code of the form
Nicholas Clark [Sun, 30 Nov 2008 23:16:09 +0000 (23:16 +0000)] 
Refactor all of the code of the form
into a static function S_save_pushptrptr().
It might be possible to make some of its callers trivial macros, and
so eliminate them as functions. But start with the easy part.

p4raw-id: //depot/perl@34957

(cherry-picked from commit e22024d3cff7db1071a80c1941fd213f9e45cd7c)

10 years agoConvert all the scope save functions of the form
Nicholas Clark [Sun, 30 Nov 2008 22:46:37 +0000 (22:46 +0000)] 
Convert all the scope save functions of the form
into a single function Perl_save_pushptr(ptr, type), which the others
call. Implement the others as macros. This reduces the object code size.

p4raw-id: //depot/perl@34956

(cherry picked from commit 2fd8beea017eccf05d12bfa6e4db7c5340ce637b)

10 years agorun regen
David Mitchell [Mon, 30 Mar 2009 13:19:38 +0000 (14:19 +0100)] 
run regen

10 years agoS_mro_get_linear_isa_*() should have an *un*signed level.
Nicholas Clark [Thu, 27 Nov 2008 22:37:41 +0000 (22:37 +0000)] 
S_mro_get_linear_isa_*() should have an *un*signed level.
[Unless it's a signed concept, use an usigned type.]

p4raw-id: //depot/perl@34948

(cherry picked from commit 94d1e7066cadf6c0f535c5b253acfe24a6200844)

10 years agoNote (hopefully) all the use cases of all the rest of the non-public but
Nicholas Clark [Thu, 27 Nov 2008 19:13:28 +0000 (19:13 +0000)] 
Note (hopefully) all the use cases of all the rest of the non-public but
exported APIs.

p4raw-id: //depot/perl@34946

(cherry-picked from commit d67fec574fe4138665a5e0ed89833497c7102c1e)

10 years agorun regen
David Mitchell [Mon, 30 Mar 2009 10:24:41 +0000 (11:24 +0100)] 
run regen

10 years agoNote where (nearly) all the other private non-static functions are used.
Nicholas Clark [Wed, 26 Nov 2008 23:50:06 +0000 (23:50 +0000)] 
Note where (nearly) all the other private non-static functions are used.

p4raw-id: //depot/perl@34942

(cherry-picked from commit 6702284617d8c80196d105d0d999663377cec94b)

10 years agotodays merging activity
David Mitchell [Mon, 30 Mar 2009 00:02:23 +0000 (01:02 +0100)] 
todays merging activity

10 years agofix some 5.10.x-specific const warnings after the big MUTABLE_* merge
David Mitchell [Sun, 29 Mar 2009 23:48:13 +0000 (00:48 +0100)] 
fix some 5.10.x-specific const warnings after the big MUTABLE_* merge

10 years agoFor 5.10.x, disable the const cast checking that MUTABLE_PTR does in blead
David Mitchell [Sun, 29 Mar 2009 23:31:43 +0000 (00:31 +0100)] 
For 5.10.x, disable the const cast checking that MUTABLE_PTR does in blead

10 years agoprovide minimal documentation for the MUTABLE_*() macros
David Mitchell [Sun, 29 Mar 2009 21:03:13 +0000 (22:03 +0100)] 
provide minimal documentation for the MUTABLE_*() macros

(cherry picked from commit cf3f0ffbff208944549640df283e3008d1b83d77)

10 years agoAllow lvalue usage of SvRV() and add MUTABLE_SV() check.
Marcus Holland-Moritz [Mon, 10 Nov 2008 19:13:20 +0000 (19:13 +0000)] 
Allow lvalue usage of SvRV() and add MUTABLE_SV() check.
Also add new SvRV_const() macro for read-only access.

p4raw-id: //depot/perl@34804

(cherry-picked from commit f19a12a3a65a1b840e4df1373a12eab6e50a8d5c
with some mods because SVt_RV no longer exists is such in bleed)

10 years agoRevert SvPVX() to allow lvalue usage, but also add a
Marcus Holland-Moritz [Fri, 7 Nov 2008 22:33:39 +0000 (22:33 +0000)] 
Revert SvPVX() to allow lvalue usage, but also add a
MUTABLE_SV() check. Use SvPVX_const() instead of SvPVX()
where only a const SV* is available. Also fix two falsely
consted pointers in Perl_sv_2pv_flags().

p4raw-id: //depot/perl@34770

(cherry-picked from commit d2c6dc5ee586de7e57a1fe8c160cf7c8aaf3f3f8)

10 years agoAdd MUTABLE_GV(), and eliminate (V *) casts in *.c.
Nicholas Clark [Fri, 31 Oct 2008 08:55:20 +0000 (08:55 +0000)] 
Add MUTABLE_GV(), and eliminate (V *) casts in *.c.
Can't easily do gv.h, as GvGP() (at least) needs to split into two
macros - one const for reading, one non-const for writing.

p4raw-id: //depot/perl@34679

(cherry-picked from commit 159b6efe04c56d08ae56a63921b5ab3a69ac2ee9)

10 years agosizeof(const SV *) is the same as sizeof(SV *), except that it doesn't
Nicholas Clark [Fri, 31 Oct 2008 07:34:02 +0000 (07:34 +0000)] 
sizeof(const SV *) is the same as sizeof(SV *), except that it doesn't
match my regexp for non-const casts.

p4raw-id: //depot/perl@34677

(cherry picked from commit 260890edab60aa2cfcb8de6aa9ee77abafa96e24)

10 years agoEliminate (SV *) casts from the rest of *.c, picking up one (further)
Nicholas Clark [Thu, 30 Oct 2008 23:22:31 +0000 (23:22 +0000)] 
Eliminate (SV *) casts from the rest of *.c, picking up one (further)
erroneous const in dump.c.

p4raw-id: //depot/perl@34675

(cherry-picked from commit ad64d0ecd555e97c5a216efca1ec5a96b7fd0b34)

10 years agoEliminate (SV *) casts from sv.c and [tu]*.c, except for the cast in
Nicholas Clark [Thu, 30 Oct 2008 21:39:14 +0000 (21:39 +0000)] 
Eliminate (SV *) casts from sv.c and [tu]*.c, except for the cast in
Perl_sv_magicext(), which is documented.

p4raw-id: //depot/perl@34671

(cherry-picked from commit daba3364ed9f39ba44b28575c032f6db52d47881)

10 years agoAdd MUTABLE_IO(), and eliminate (IO *) casts in *.c.
Nicholas Clark [Wed, 29 Oct 2008 23:20:01 +0000 (23:20 +0000)] 
Add MUTABLE_IO(), and eliminate (IO *) casts in *.c.

p4raw-id: //depot/perl@34654

(cherry picked from commit a45c7426c93f17067d1734c68cb400246e1db490)

10 years agoEliminate (AV *) casts in *.c.
Nicholas Clark [Wed, 29 Oct 2008 22:45:15 +0000 (22:45 +0000)] 
Eliminate (AV *) casts in *.c.

p4raw-id: //depot/perl@34650

(cherry-picked from commit 502c6561fcd473b7da3277363169d75f16ac2f8b)

10 years agoAdd MUTABLE_CV(), and eliminate (CV *) casts in *.c.
Nicholas Clark [Wed, 29 Oct 2008 21:57:34 +0000 (21:57 +0000)] 
Add MUTABLE_CV(), and eliminate (CV *) casts in *.c.

p4raw-id: //depot/perl@34647

(cherry-picked from commit ea726b52599b52cf534201a46ec3455418c9eb8e)

10 years agoEvery remaining (HV *) cast in *.c
Nicholas Clark [Tue, 28 Oct 2008 22:14:26 +0000 (22:14 +0000)] 
Every remaining (HV *) cast in *.c

p4raw-id: //depot/perl@34629

(cherry-picked from commit 85fbaab29c398adbb5b4445d3ed41e0a96364ce4)

10 years agoss_dup wrapper const casting analagous to change 34626.
Nicholas Clark [Tue, 28 Oct 2008 21:59:11 +0000 (21:59 +0000)] 
ss_dup wrapper const casting analagous to change 34626.

p4raw-id: //depot/perl@34628

(cherry picked from commit b8082b6e76ddae55d59bd06493f5cb60a320b165)

10 years agoSome consting in Perl_ss_dup(), and a few (HV*) casts that can be
Nicholas Clark [Tue, 28 Oct 2008 20:56:50 +0000 (20:56 +0000)] 
Some consting in Perl_ss_dup(), and a few (HV*) casts that can be
(const HV *).

p4raw-id: //depot/perl@34626

(cherry picked from commit 1d1936752b08f97898c1aed5d2c9f75d1560ff60)

10 years agoEliminate (HV *) casts in u*.c.
Nicholas Clark [Tue, 28 Oct 2008 20:13:55 +0000 (20:13 +0000)] 
Eliminate (HV *) casts in u*.c.

p4raw-id: //depot/perl@34624

(cherry-picked from commit ef8f7699778dff55cfd4d5ca899723febaa96cd0)

10 years agoA gaggle of casts in Perl_sv_magicext() that are (const ?V *).
Nicholas Clark [Tue, 28 Oct 2008 20:13:13 +0000 (20:13 +0000)] 
A gaggle of casts in Perl_sv_magicext() that are (const ?V *).

p4raw-id: //depot/perl@34623

(cherry picked from commit 4c4652b6d968d9437bc85193bd123507e4c83bca)

10 years agoTwo casts that are MUTABLE_?V.
Nicholas Clark [Tue, 28 Oct 2008 20:12:16 +0000 (20:12 +0000)] 
Two casts that are MUTABLE_?V.

p4raw-id: //depot/perl@34622

(cherry picked from commit 3cb1dbc621ea6bcc05f2289da05ca9883cc40ef1)

10 years agoA couple of (COP*)s that can actually be (const COP *)s.
Nicholas Clark [Tue, 28 Oct 2008 19:51:07 +0000 (19:51 +0000)] 
A couple of (COP*)s that can actually be (const COP *)s.

p4raw-id: //depot/perl@34621

(cherry picked from commit c6903450838086ba02cb3a4b04bd5f6047187b9d)

10 years agoAdd MUTABLE_HV(), and remove (HV *) casts from headers.
Nicholas Clark [Tue, 28 Oct 2008 18:30:54 +0000 (18:30 +0000)] 
Add MUTABLE_HV(), and remove (HV *) casts from headers.

p4raw-id: //depot/perl@34619

(cherry picked from commit dbebbdb4f8fce905319dd478ac6436d7a5ae8cad)

10 years agoCorrect SvVALID() and SvTAIL() - they are actually const.
Nicholas Clark [Mon, 27 Oct 2008 22:39:45 +0000 (22:39 +0000)] 
Correct SvVALID() and SvTAIL() - they are actually const.

p4raw-id: //depot/perl@34613

(cherry picked from commit e9726144eab9da5d0ccdc0c6f4308a69bed719ee)

10 years agoMHX notes that I have a superfluous void cast.
Nicholas Clark [Mon, 27 Oct 2008 22:22:50 +0000 (22:22 +0000)] 
MHX notes that I have a superfluous void cast.

p4raw-id: //depot/perl@34612

(cherry picked from commit f065df047b3b91cdea02a1ecce8f0c0e9045d9de)

10 years agoConvert all (CV *) casts to (const CV *). Convert (XPVCV*) casts to add
Nicholas Clark [Mon, 27 Oct 2008 21:43:01 +0000 (21:43 +0000)] 
Convert all (CV *) casts to (const CV *). Convert (XPVCV*) casts to add
MUTABLE_PTR(), to validate that there is no casting away of const.

p4raw-id: //depot/perl@34610

(cherry picked from commit 8f629a87fe8f340f7e1d3258b7972985953c03fc)

10 years agoAdd MUTABLE_AV(), and remove (AV *) casts from headers.
Nicholas Clark [Mon, 27 Oct 2008 21:23:04 +0000 (21:23 +0000)] 
Add MUTABLE_AV(), and remove (AV *) casts from headers.

p4raw-id: //depot/perl@34608

(cherry picked from commit a062e10d14f53c3718ae4dbf13be27233d85afcc)

10 years agoAdd a macro MUTABLE_PTR(p), which on (non-pedantic) gcc will not cast
Nicholas Clark [Mon, 27 Oct 2008 20:25:46 +0000 (20:25 +0000)] 
Add a macro MUTABLE_PTR(p), which on (non-pedantic) gcc will not cast
away const, returning a void *. Add MUTABLE_SV(sv) which uses this, and
replace all (SV *) casts either with MUTABLE_SV(sv), or (const SV *).

This probably still needs some work - assigning to SvPVX() and SvRV()
is now likely to generate a casting error. The core doesn't do this.
But as-is it's finding bugs that can be fixed.

p4raw-id: //depot/perl@34605

(cherry-picked from commit b1bc3f345d4dfe19cd94c120c46649336b5cb92b)

10 years agoAdd PERL_ARGS_ASSERT_MEM_LOG_COMMON to S_mem_log_common().
Marcus Holland-Moritz [Fri, 24 Oct 2008 18:33:26 +0000 (18:33 +0000)] 
Add PERL_ARGS_ASSERT_MEM_LOG_COMMON to S_mem_log_common().

p4raw-id: //depot/perl@34570

(cherry picked from commit 4ca7bcefeb672d89a032dee75decf2670a253fdf)

10 years agoIn S_mro_get_linear_isa_dfs(), add void casts to silence two warnings
Nicholas Clark [Fri, 12 Sep 2008 21:02:55 +0000 (21:02 +0000)] 
In S_mro_get_linear_isa_dfs(), add void casts to silence two warnings
about "value computed is not used". Re-order the code to group
operations on the isa hash with each other. Add a SvREADONLY_on() on
the isa array if it is generated by Perl_get_isa_hash().

p4raw-id: //depot/perl@34357

(cherry picked from commit ed09b296cb65baf1e63050da7be88c8877c28d10)

10 years agoBuild the isa cache from any linear ISA, rather than forcing the use
Nicholas Clark [Fri, 12 Sep 2008 09:25:55 +0000 (09:25 +0000)] 
Build the isa cache from any linear ISA, rather than forcing the use
of dfs. This avoids calling dfs on a C3 class (and all its parents),
which won't break anything, but is more work than is needed.

p4raw-id: //depot/perl@34356

(cherry picked from commit 6e4aef591331d48363634d9ad4a01d6c6b5f5577)

10 years agoNeed to free the isa lookup hash before rebuilding it.
Nicholas Clark [Fri, 12 Sep 2008 08:52:50 +0000 (08:52 +0000)] 
Need to free the isa lookup hash before rebuilding it.

p4raw-id: //depot/perl@34355

(cherry picked from commit 5782d502273e5b6d06607ebe625248c4c102d93b)

10 years agoCreate a direct lookup hash for ->isa() lookup, by retaining the
Nicholas Clark [Fri, 12 Sep 2008 00:19:51 +0000 (00:19 +0000)] 
Create a direct lookup hash for ->isa() lookup, by retaining the
de-duping hash used by S_mro_get_linear_isa_dfs(). Provide a new
function Perl_get_isa_hash() to lazily retrieve this. (Which could
actually be static if S_isa_lookup() and Perl_sv_derived_from()
moved into mro.c.) Make S_isa_lookup() use this lookup hash in place
of a linear walk of the linear isa. This should turn isa lookups from
O(n) to O(1), which should make heavy users of ->isa() faster.
(eg PPI, and hence Perl Critic).

p4raw-id: //depot/perl@34354

(cherry-picked from commit a49ba3fcbe357fbacf7b9898df08daa2cbdfc8c4)

10 years agoAbolish the warning "Can't locate package %"SVf" for the parents of %s"
Nicholas Clark [Thu, 11 Sep 2008 22:11:32 +0000 (22:11 +0000)] 
Abolish the warning "Can't locate package %"SVf" for the parents of %s"
which doesn't tell you anything you won't discover soon enough when you
try to call a method. (Or haven't already been warned about when @ISA
was linearised)

p4raw-id: //depot/perl@34353

(cherry picked from commit c109477dfda0dedbe3c4ffa3d6074085d3b8497a)

10 years agoSilence build warnings in universal.c
Jerry D. Hedden [Wed, 21 May 2008 13:15:28 +0000 (09:15 -0400)] 
Silence build warnings in universal.c
From: "Jerry D. Hedden" <>
Message-ID: <>

p4raw-id: //depot/perl@33910

(cherry picked from commit 93c512172a58c199c03358764753a650e33707e2)

10 years agoMake the worst case error message for Perl_croak_xs_usage() consistent
Nicholas Clark [Wed, 21 May 2008 14:35:20 +0000 (14:35 +0000)] 
Make the worst case error message for Perl_croak_xs_usage() consistent
with stringifying a code reference.

p4raw-id: //depot/perl@33902

(cherry picked from commit 8565890c866fc4b9562f5d1ac6f565c47d3a90df)

10 years agoAdd Perl_croak_xs_usage(), which reduces a lot of explicit calls of
Nicholas Clark [Wed, 21 May 2008 13:35:43 +0000 (13:35 +0000)] 
Add Perl_croak_xs_usage(), which reduces a lot of explicit calls of
the form Perl_croak(aTHX_ "Usage %s::%s(%s)", "ouch" "awk", "eee_yow");
down to croak_xs_usage(cv, "eee_yow"); and refactor all the core XS
code to use it. This adds () to the error messages for attributes::*

p4raw-id: //depot/perl@33901

(cherry picked from commit afa74d4282044c64ab152392003f47bb0674abd2)

10 years agoPrevent the tokenizer from segfaulting in debug mode when a FUNC token is forced
Rafael Garcia-Suarez [Fri, 16 May 2008 12:13:23 +0000 (14:13 +0200)] 
Prevent the tokenizer from segfaulting in debug mode when a FUNC token is forced
   From: "Rafael Garcia-Suarez" <>
   Message-ID: <>

p4raw-id: //depot/perl@33833

(cherry picked from commit f05d7009fffc72d5b11ea5e553117baa7256a9a7)

10 years agotodays merging activity
David Mitchell [Thu, 26 Mar 2009 00:41:35 +0000 (00:41 +0000)] 
todays merging activity

10 years agoClean up unused 'popt' variable in perl.c
Jerry D. Hedden [Mon, 14 Apr 2008 16:07:42 +0000 (12:07 -0400)] 
Clean up unused 'popt' variable in perl.c
From: "Jerry D. Hedden" <>
Message-ID: <>
Date: Mon, 14 Apr 2008 16:07:42 -0400

p4raw-id: //depot/perl@33683

(cherry picked from commit b3562f19ee0d76b60d176a0b1cfdac4f5f36785c)

10 years agoNo need to copy the part of PERL5OPT that we've already scanned past.
Nicholas Clark [Mon, 14 Apr 2008 18:09:35 +0000 (18:09 +0000)] 
No need to copy the part of PERL5OPT that we've already scanned past.

p4raw-id: //depot/perl@33682

(cherry picked from commit bfa6c418906571a0809c2388a78539a223ec23b4)

10 years agoVery little const-propagation remains related to Perl_moreswitches().
Nicholas Clark [Mon, 14 Apr 2008 17:46:26 +0000 (17:46 +0000)] 
Very little const-propagation remains related to Perl_moreswitches().

p4raw-id: //depot/perl@33681

(cherry picked from commit 549135093eac93ac67c83cd65e6d8789e8b205a2)

10 years agoRe: Solaris build warnings
Andy Dougherty [Wed, 26 Mar 2008 13:42:06 +0000 (09:42 -0400)] 
Re: Solaris build warnings
Message-ID: <>

Rename the "optype" typedef to "Optype"

p4raw-id: //depot/perl@33679

(cherry picked from commit 61a59f30bcebf88ce17229ad2276090c32ad7c1f)

10 years agoDefine sv_insert() as a wrapper to sv_insert_flags(), and move
Nicholas Clark [Tue, 1 Apr 2008 19:59:54 +0000 (19:59 +0000)] 
Define sv_insert() as a wrapper to sv_insert_flags(), and move
Perl_sv_insert() to mathoms.c

p4raw-id: //depot/perl@33627

(cherry-picked from commit 84335ee93339f99a0959258e640fa57e9f0ba6ab)

10 years agoAdd the correct argument assertion macro to sv_insert_flags().
Nicholas Clark [Tue, 1 Apr 2008 18:47:01 +0000 (18:47 +0000)] 
Add the correct argument assertion macro to sv_insert_flags().
Don't want anything wrongly marked as non-NULL slipping through.

p4raw-id: //depot/perl@33626

(cherry picked from commit 27aecdc667df7df9dfe00209a819ab9abfc274ea)

10 years agoDouble magic with substr
Vincent Pit [Mon, 31 Mar 2008 19:05:44 +0000 (21:05 +0200)] 
Double magic with substr
Message-ID: <>

p4raw-id: //depot/perl@33618

(cherry-picked from commit c0dd94a09fcdb6ab5e0b1ca3c71b5902301ca665)

10 years agoPerl_croak_nocontext() is called with NULL indirectly from
Steve Peters [Sat, 8 Mar 2008 15:13:26 +0000 (15:13 +0000)] 
Perl_croak_nocontext() is called with NULL indirectly from
some XS-based modules.

p4raw-id: //depot/perl@33453

(cherry picked from commit 52a5bfab8876f302d269f1bfa46eae1998f0d3ca)

10 years agoAssert that the av argument to all the av_*() functions is an array.
Nicholas Clark [Sat, 8 Mar 2008 11:20:28 +0000 (11:20 +0000)] 
Assert that the av argument to all the av_*() functions is an array.

p4raw-id: //depot/perl@33452

(cherry-picked from commit 2fed2a1ba94aec1ffaf141357a7d90754b2b3208)

10 years agoChange variable name to fix debug build with PERL_OLD_COPY_ON_WRITE
Steve Hay [Wed, 27 Feb 2008 12:29:36 +0000 (12:29 +0000)] 
Change variable name to fix debug build with PERL_OLD_COPY_ON_WRITE

p4raw-id: //depot/perl@33384

(cherry picked from commit bcfe2509c9c690ad84f6fd6d67302d2fbefea805)

10 years agoSilence compiler warnings on Win32/VC6
Jan Dubois [Thu, 14 Feb 2008 11:24:01 +0000 (03:24 -0800)] 
Silence compiler warnings on Win32/VC6

Subject: RE: Bit-fields patch causes warnings on Win32/VC6
From: "Jan Dubois" <>
Message-ID: <002f01c86f3f$27e23ca0$77a6b5e0$@com>

p4raw-id: //depot/perl@33315

(cherry-picked from commit 0053d415f506c0bd87de287f5b4d68652d94b7b1)

10 years agodoio.c:Perl_my_lstat:/* XXX Do really need to be calling SvPV() all these times? */
Vincent Pit [Thu, 14 Feb 2008 15:21:29 +0000 (16:21 +0100)] 
doio.c:Perl_my_lstat:/* XXX Do really need to be calling SvPV() all these times? */
From: "Vincent Pit" <>
Message-ID: <37048.>

p4raw-id: //depot/perl@33310

(cherry picked from commit b16276bb9e16a3b99d6fb450f4e0902e32b01f85)

10 years agoupdate mergelog
David Mitchell [Sun, 22 Mar 2009 00:20:03 +0000 (00:20 +0000)] 
update mergelog