platform/upstream/perl.git
10 years agoimprove regexec_flags() API documentation
David Mitchell [Tue, 13 Aug 2013 21:25:46 +0000 (22:25 +0100)]
improve regexec_flags() API documentation

In the API, rename the 'screamer' arg to be 'sv' instead;
update the description of the functions args;
improve the documentation of the REXEC_* flags for the 'flags' arg.

10 years agoCorrect perlguts docs about PADMY & PADTMP
Father Chrysostomos [Tue, 13 Aug 2013 20:13:44 +0000 (13:13 -0700)]
Correct perlguts docs about PADMY & PADTMP

10 years agoCopy PADTMPS passed to XSUBs
Father Chrysostomos [Tue, 13 Aug 2013 20:10:15 +0000 (13:10 -0700)]
Copy PADTMPS passed to XSUBs

This resolves the last remaining issue in ticket #78194, that
newRV is supposedly buggy because it doesn’t copy its referent.
The full implications of the PADTMP are not explained anywhere in
the API docs, and even XSUBs shouldn’t have to worry about special
handling.  (E.g., what if they do SvREFCNT_dec(SvRV(sv)); SvRV(sv)=...?)

So the real solution here is not to let XSUBs see them.

10 years agoDescribe ext/XS-APItest/t/call.t better
Father Chrysostomos [Tue, 13 Aug 2013 16:05:30 +0000 (09:05 -0700)]
Describe ext/XS-APItest/t/call.t better

10 years agoperldelta for Devel::Peek::Dump changes
Father Chrysostomos [Tue, 13 Aug 2013 15:56:12 +0000 (08:56 -0700)]
perldelta for Devel::Peek::Dump changes

10 years agoUpdate Devel::Peek docs with Dump changes
Father Chrysostomos [Tue, 13 Aug 2013 15:39:14 +0000 (08:39 -0700)]
Update Devel::Peek docs with Dump changes

Boy, does this whole document need a rewrite....

10 years agoInline Devel::Peek::Dump; allow Dump %hash etc.
Father Chrysostomos [Mon, 12 Aug 2013 04:54:11 +0000 (21:54 -0700)]
Inline Devel::Peek::Dump; allow Dump %hash etc.

This commit makes Devel::Peek::Dump modify the op tree to allow it to
dump arrays and hashes directly via Dump @array and Dump %hash.  It
also puts other operators in rvalue context, allowing the return value
of rvalue substr for instance to be dumped, making Devel::Peek more
useful as a debugging tool.

Since a future commit (to fix the rest of #78194) is likely to make
pp_entersub copy PADTMPs (operator return values) for XSUBs (it
already happens for Perl subs as of b479c9f2a), to the detriment of
Devel::Peek’s usefulness, I also made it inline Dump as a custom op.

This does introduce a backward-incompatible change, in that both argu-
ments to Dump are now in scalar context, and the number of arguments
is checked at compile time instead of run time (still run time for
&Dump(...)), but I think it is worth it.

10 years agoUpdate win32/config_H.[gv]c canned configuration files
Steve Hay [Tue, 13 Aug 2013 13:34:37 +0000 (14:34 +0100)]
Update win32/config_H.[gv]c canned configuration files

The win32/config.[gv]c files are generally kept up to date these days (and
we have tests to check that) so no changes are required in them.

The win32/config_H.[gv]c files are regenerated as per instructions in the
win32/Makefile and win32/makefile.mk, being careful to restore a couple of
things otherwise lost from the config_H.gc file. The files are now in sync
with the top-level master configuration file, config_h.SH.

10 years agoWrite win32/config.h with *nix EOLs, as per the canned config_H.* files
Steve Hay [Tue, 13 Aug 2013 13:04:53 +0000 (14:04 +0100)]
Write win32/config.h with *nix EOLs, as per the canned config_H.* files

This makes no difference when actually building perl, but saves a dos2unix
when regenerating the canned files with the regen_config_h makefile targets.

10 years agoperldelta: add entries for c3923c3, e82485c
David Mitchell [Tue, 13 Aug 2013 15:09:33 +0000 (16:09 +0100)]
perldelta: add entries for c3923c3, e82485c

10 years agoperldelta for 61e9f3f
Father Chrysostomos [Tue, 13 Aug 2013 15:24:59 +0000 (08:24 -0700)]
perldelta for 61e9f3f

10 years agoAppease podcheck.t
Father Chrysostomos [Tue, 13 Aug 2013 15:21:59 +0000 (08:21 -0700)]
Appease podcheck.t

It doesn’t like E<quot> in links, though the pod spec (if I read it
correctly) allows it.  It doesn’t mind quotes within quotes.

10 years agoperldelta for #92260/b59747a
Father Chrysostomos [Tue, 13 Aug 2013 13:08:56 +0000 (06:08 -0700)]
perldelta for #92260/b59747a

10 years agoperldelta for #117355/aca7040
Father Chrysostomos [Tue, 13 Aug 2013 13:07:33 +0000 (06:07 -0700)]
perldelta for #117355/aca7040

10 years agoperldelta for #3330/8140a7a
Father Chrysostomos [Tue, 13 Aug 2013 13:02:04 +0000 (06:02 -0700)]
perldelta for #3330/8140a7a

10 years agoStop reset from clearing aliases to globs
Father Chrysostomos [Tue, 13 Aug 2013 12:55:12 +0000 (05:55 -0700)]
Stop reset from clearing aliases to globs

If $z has been aliased to *foo, then reset("z") would turn off the
SvOK flags on *foo, putting it in an inconsistent state.  This could
cause crashes.

10 years agoperldelta for 045071e
Father Chrysostomos [Tue, 13 Aug 2013 05:11:24 +0000 (22:11 -0700)]
perldelta for 045071e

10 years agoperldelta for 5f213d9
Father Chrysostomos [Tue, 13 Aug 2013 05:08:34 +0000 (22:08 -0700)]
perldelta for 5f213d9

10 years agoperldelta for 9bcf803 and 376ccf8
Father Chrysostomos [Tue, 13 Aug 2013 05:07:51 +0000 (22:07 -0700)]
perldelta for 9bcf803 and 376ccf8

10 years agoperldelta for 85b7d9b
Father Chrysostomos [Tue, 13 Aug 2013 05:06:27 +0000 (22:06 -0700)]
perldelta for 85b7d9b

10 years agoperldelta for 48120f8
Father Chrysostomos [Tue, 13 Aug 2013 05:05:16 +0000 (22:05 -0700)]
perldelta for 48120f8

10 years agoperldelta for 3b68edc
Father Chrysostomos [Tue, 13 Aug 2013 05:02:52 +0000 (22:02 -0700)]
perldelta for 3b68edc

10 years agoperldelta: another to-do
Father Chrysostomos [Tue, 13 Aug 2013 05:00:46 +0000 (22:00 -0700)]
perldelta: another to-do

10 years agoperldelta for a547fd2
Father Chrysostomos [Tue, 13 Aug 2013 04:43:09 +0000 (21:43 -0700)]
perldelta for a547fd2

10 years agoperldelta for 9e0ea7f
Father Chrysostomos [Tue, 13 Aug 2013 04:28:07 +0000 (21:28 -0700)]
perldelta for 9e0ea7f

The thing about locking hash keys inside the substitution and
vivifying globs is too hard to explain clearly and concisely.
This section is entitled ‘*Selected* Bug Fixes’, after all.

10 years agoperldelta for 649c173
Father Chrysostomos [Tue, 13 Aug 2013 04:26:03 +0000 (21:26 -0700)]
perldelta for 649c173

10 years agoperldelta: another to-do
Father Chrysostomos [Tue, 13 Aug 2013 04:23:43 +0000 (21:23 -0700)]
perldelta: another to-do

10 years agoperldelta for 51da40e
Father Chrysostomos [Tue, 13 Aug 2013 03:42:54 +0000 (20:42 -0700)]
perldelta for 51da40e

10 years agoperldelta for 6b35226
Father Chrysostomos [Tue, 13 Aug 2013 03:27:06 +0000 (20:27 -0700)]
perldelta for 6b35226

10 years agoperldelta for 3df32bd
Father Chrysostomos [Tue, 13 Aug 2013 03:25:38 +0000 (20:25 -0700)]
perldelta for 3df32bd

10 years agoperldelta for 1311cfc
Father Chrysostomos [Tue, 13 Aug 2013 03:24:23 +0000 (20:24 -0700)]
perldelta for 1311cfc

10 years agoperldelta: anither to-do
Father Chrysostomos [Tue, 13 Aug 2013 03:22:03 +0000 (20:22 -0700)]
perldelta: anither to-do

10 years agoperldelta for c30fc27
Father Chrysostomos [Tue, 13 Aug 2013 03:19:01 +0000 (20:19 -0700)]
perldelta for c30fc27

The first part was stolen from 72251ce78c061 on the maint-5.18 branch.

10 years agoperldelta: missing =item
Father Chrysostomos [Tue, 13 Aug 2013 03:16:06 +0000 (20:16 -0700)]
perldelta: missing =item

10 years ago[perl #45667] Apply tests from #119125 in reverse
Father Chrysostomos [Tue, 13 Aug 2013 03:07:33 +0000 (20:07 -0700)]
[perl #45667] Apply tests from #119125 in reverse

Ticket #119125 represents the breakage caused by c30fc27b4df65a, which
fixed #45667 (/[#]$not_interpolated/x; a regression from 5.000) as a
side-effect of fixing /[#](?{this is not a code block})/x (a regres-
sion from 5.16.0).

It was backported to maint-5.18, which broke several modules, because
bug #45667 is *old*, and many modules depend on it.

So 02682386fe3e on the maint branch modified the fix to apply only to
code blocks, and added tests to make sure that #45667 wasn’t fixed.

#45667 is fixed in blead, but is untested, so grab the tests from
02682386fe3e and reverse the logic of the second one.

10 years agomg.c: Fix U32-to-bool assignment
Father Chrysostomos [Mon, 12 Aug 2013 22:52:23 +0000 (15:52 -0700)]
mg.c: Fix U32-to-bool assignment

This was caused by 3805b5fb04.  This commit restores the !=0 that
was there before 2fd13eccf0.

Thanks to Steve Hay for helping to track down the smoke failures.

10 years agoperldelta for #118213/5b0e71e
Father Chrysostomos [Mon, 12 Aug 2013 23:15:47 +0000 (16:15 -0700)]
perldelta for #118213/5b0e71e

10 years agoperldelta: more to-do items
Father Chrysostomos [Mon, 12 Aug 2013 23:12:04 +0000 (16:12 -0700)]
perldelta: more to-do items

10 years agoperldelta: begin a to-do list
Father Chrysostomos [Mon, 12 Aug 2013 23:00:26 +0000 (16:00 -0700)]
perldelta: begin a to-do list

10 years agoperldelta for 1913067
Father Chrysostomos [Mon, 12 Aug 2013 21:34:30 +0000 (14:34 -0700)]
perldelta for 1913067

10 years agoperldelta for 5d71919
Father Chrysostomos [Mon, 12 Aug 2013 21:31:29 +0000 (14:31 -0700)]
perldelta for 5d71919

10 years agoperldelta for #79908/137da2b
Father Chrysostomos [Mon, 12 Aug 2013 21:29:16 +0000 (14:29 -0700)]
perldelta for #79908/137da2b

10 years agoperldelta for mutable inlining & folding
Father Chrysostomos [Mon, 12 Aug 2013 21:27:36 +0000 (14:27 -0700)]
perldelta for mutable inlining & folding

2484f8d Stop folding of ops from changing mutability
94d5c17 Stop constant.pm from (ab)using subs for scalars
6f1b3ab Allow stash elems to be array refs
f815dc1 Inline list constants
c5a2441 Update constant.pm to reflect list inlinement
08f3c42 Tweak optree_constants.t for inlined list consts
d244020 Make sub(){42} return a mutable value
0ad6fa3 Stop op freeing from interfering with sub(){42} mutability

10 years agoperldelta for #3105/5608dcc
Father Chrysostomos [Mon, 12 Aug 2013 21:24:18 +0000 (14:24 -0700)]
perldelta for #3105/5608dcc

10 years agoperldelta for \$_.\$_ no longer giving 2 addresses
Father Chrysostomos [Mon, 12 Aug 2013 21:21:25 +0000 (14:21 -0700)]
perldelta for \$_.\$_ no longer giving 2 addresses

325e181 pad.c: Use &PL_sv_no for const pad names
82b84d0 op.c: Stop copying constants under ithreads
4891fdf pad.c: cast before comparing signed with unsigned
a0ed822 [perl #78194] Make grep/map copy pad tmps
b479c9f [perl #78194] Make sub calls copy pad tmps
8e079c2 [perl #78194] Make foreach copy pad tmps
706a6eb [perl #78194] Make list slices copy PADTMPs in lv cx
da9e430 [perl #78194] Make x copy PADTMPs in lv cx
2b66f6d [perl #78194] Make sort copy PADTMPs
82c2360 [perl #78194] Make re-evals copy PADTMPs
fb09017 pad.c apidocs: Clarify use of &PL_sv_no

10 years agoperldelta for ef54055
Father Chrysostomos [Mon, 12 Aug 2013 21:10:17 +0000 (14:10 -0700)]
perldelta for ef54055

10 years agoperldelta for #72766/6174b39
Father Chrysostomos [Mon, 12 Aug 2013 21:08:38 +0000 (14:08 -0700)]
perldelta for #72766/6174b39

10 years agoUpdate t/porting/customized.dat for cpan/libnet/Makefile.PL
Steve Hay [Mon, 12 Aug 2013 23:43:56 +0000 (00:43 +0100)]
Update t/porting/customized.dat for cpan/libnet/Makefile.PL

10 years agoUpgrade Time::Piece from 1.21 to 1.22
Steve Hay [Mon, 12 Aug 2013 23:04:41 +0000 (00:04 +0100)]
Upgrade Time::Piece from 1.21 to 1.22

10 years agoUpgrade IO::Compress::* and Compress::Raw::* from 2.061 to 2.062
Steve Hay [Mon, 12 Aug 2013 23:03:39 +0000 (00:03 +0100)]
Upgrade IO::Compress::* and Compress::Raw::* from 2.061 to 2.062

10 years agoUpgrade libnet from 1.22_02 to 1.23
Steve Hay [Mon, 12 Aug 2013 22:41:35 +0000 (23:41 +0100)]
Upgrade libnet from 1.22_02 to 1.23

Changed my mind over the UPSTREAM status too: 'cpan' is probably better
after all. As long as someone (currently me) is responsive in rolling new
CPAN releases then any patches from core can safely go to rt.cpan.org
without getting stuck on a pile for a long time. Meanwhile, other patches
sent to rt.cpan.org may also get applied, and hopefully one day a more
active maintainer may be found. This also saves having to move it from
cpan/ to dist/.

10 years agoSync version of Module-CoreList
Chris 'BinGOs' Williams [Mon, 12 Aug 2013 20:59:55 +0000 (21:59 +0100)]
Sync version of Module-CoreList

10 years agoFix MANIFEST and update Changes in Module-CoreList
Chris 'BinGOs' Williams [Mon, 12 Aug 2013 20:59:02 +0000 (21:59 +0100)]
Fix MANIFEST and update Changes in Module-CoreList

10 years agolib/locale.t: Make suitable for testing locales sanity
Karl Williamson [Thu, 8 Aug 2013 03:30:01 +0000 (21:30 -0600)]
lib/locale.t: Make suitable for testing locales sanity

This just adds some more explanatory text to the output when errors are
encountered, and causes it to not generate TODOs for failing tests under
debug mode.  These TODOs were generated when only a small percentage of
the locales have failures, thus indicating that the fault is in those
locale definitions and not Perl itself, and hence we shouldn't fail the
build because somebody's system has a few bad locale definitions.

This commit causes the failures to be real failures when under debug
mode.  Given this and the new explanatory text, this .t is suitable for
testing locales for sanity.  I'll ask p5p whether we should advertise
that fact or not.

10 years agolib/locale.t: Move advice output to end
Karl Williamson [Thu, 8 Aug 2013 02:44:32 +0000 (20:44 -0600)]
lib/locale.t: Move advice output to end

This just moves a block so that the messages it generates are displayed
at the end of the locale.t output, instead of in the middle.  This makes
them more likely to be noticed.

10 years agolocale.t: Don't show 100% pass when there are failures
Karl Williamson [Thu, 8 Aug 2013 02:05:27 +0000 (20:05 -0600)]
locale.t: Don't show 100% pass when there are failures

This was because it only rounded to the nearest percent.  Rounding to
the nearest .1% should eliminate the problem, as there are fewer than
1000 possible locales.

10 years agolocale.c: Rmv unused variable
Karl Williamson [Sun, 28 Jul 2013 04:05:14 +0000 (22:05 -0600)]
locale.c: Rmv unused variable

10 years agolib/locale.t: White-space only
Karl Williamson [Mon, 12 Aug 2013 19:15:27 +0000 (13:15 -0600)]
lib/locale.t: White-space only

This outdents text and reflows comments in a now-removed block

10 years agolib/locale.t: Don't skip certain tests
Karl Williamson [Mon, 12 Aug 2013 18:47:50 +0000 (12:47 -0600)]
lib/locale.t: Don't skip certain tests

The removed code caused tests to be skipped when the locale doesn't add
any \w characters beyond the C locale.  That meant in practice these
tests were likely skipped only for the C and POSIX locales.  The problem
is that doing this required extra complexity in figuring out how many
tests to skip.  Removing this makes the code easier to understand and
maintain.

10 years agolib/locale.t: Remove useless test.
Karl Williamson [Sat, 27 Jul 2013 19:53:12 +0000 (13:53 -0600)]
lib/locale.t: Remove useless test.

This test verified that certain things matched \w.  However the list of
those things was assembled by matching \w in the first place.  So it
tested nothing new.

10 years agolib/locale.t: Add a bunch of tests.
Karl Williamson [Sat, 27 Jul 2013 19:48:33 +0000 (13:48 -0600)]
lib/locale.t: Add a bunch of tests.

These test that various relationships that POSIX specifies are met in
each locale, including that a class and its complement are mutually
exclusive, that some classes are subsets of another (like [:upper:]
being a subset of [:alpha:]), and that some things can't be in two
conflicting classes (such as [:print:] and [:cntrl:]).

The tests are marked as TODO, like similar existing tests, if only a
small percentage of locales fail them.  This indicates that those
locales are defective, while Perl and most other locales are ok.

10 years agolib/locale.t: Better debug output
Karl Williamson [Sat, 27 Jul 2013 19:43:50 +0000 (13:43 -0600)]
lib/locale.t: Better debug output

This adds infrastructure and uses it to report the individual characters
that fail tests.

10 years agolib/locale.t: Add test name to debug output
Karl Williamson [Sat, 27 Jul 2013 19:38:18 +0000 (13:38 -0600)]
lib/locale.t: Add test name to debug output

This makes it easier to understand what is going wrong.

10 years agolib/locale.t: Add omitted test cases
Karl Williamson [Sat, 20 Jul 2013 18:12:01 +0000 (12:12 -0600)]
lib/locale.t: Add omitted test cases

The tests were failing to include caseless alphabetic characters;
many languages are not cased..

10 years agolib/locale.t: Rename some internal elements
Karl Williamson [Sat, 20 Jul 2013 18:03:11 +0000 (12:03 -0600)]
lib/locale.t: Rename some internal elements

I have never understood what 'neoalpha' meant.  I believe it is actually
neo - alpha, But when I read it, I don't notice the 'a' and see it as
"n-end-of-line".  This renames it to something I can understand.

10 years agolib/locale.t: Add comments; clarify some test names
Karl Williamson [Sat, 20 Jul 2013 17:49:01 +0000 (11:49 -0600)]
lib/locale.t: Add comments; clarify some test names

I had to really study what these tests were doing; the new names are
clearer.

10 years agolib/locale.t: Allow turning on debug via env
Karl Williamson [Sat, 20 Jul 2013 17:37:55 +0000 (11:37 -0600)]
lib/locale.t: Allow turning on debug via env

Instead of having to edit the file to turn on debug mode, additionally
allow the use of an environment variable.  This makes it more
convenient to ask someone in the field to run the test.

10 years agoAssume UTF-8 locale if that string occurs anywhere in name
Karl Williamson [Sat, 13 Jul 2013 19:43:31 +0000 (13:43 -0600)]
Assume UTF-8 locale if that string occurs anywhere in name

When a platform doesn't have nl_langinfo(), heuristics are employed
to see if a locale is UTF-8 .  The first heuristic is looking at the
return value of setlocale(), which generally is the locale name.
However, in actuality the return value is opaque and can't be relied on
to signify the locale.  Nevertheless if it contains the string UTF-8
(ignoring case, and with the hyphen optional), it is a safe bet that the
locale is indeed UTF-8.  Prior to this patch, we only looked at the end
of the name for "UTF-8".  This patch makes it not have to be
right-anchored.  There are UTF-8 locales on our dromedary machine with
UTF-8 in the middle of their names.

10 years agoExtUtils-ParseXS is now version 3.21
Steve Hay [Mon, 12 Aug 2013 17:01:43 +0000 (18:01 +0100)]
ExtUtils-ParseXS is now version 3.21

10 years agoimport CoreList changes from v5.18.1
Ricardo Signes [Mon, 12 Aug 2013 15:18:12 +0000 (11:18 -0400)]
import CoreList changes from v5.18.1

10 years agoTypo fix in comment
Smylers [Thu, 8 Aug 2013 10:43:47 +0000 (11:43 +0100)]
Typo fix in comment

10 years agoPeek.t: Fix a test
Father Chrysostomos [Mon, 12 Aug 2013 15:24:46 +0000 (08:24 -0700)]
Peek.t: Fix a test

This scalar can end up becoming a COW with standard builds, but not
with threads+mad.

10 years agoepigraphs: replace E<0x2014> with literal U+2014 to avoid podchecker error
Ricardo Signes [Mon, 12 Aug 2013 14:49:11 +0000 (10:49 -0400)]
epigraphs: replace E<0x2014> with literal U+2014 to avoid podchecker error

10 years agoadd epigraphs from v5.18.1
Ricardo Signes [Mon, 12 Aug 2013 14:46:05 +0000 (10:46 -0400)]
add epigraphs from v5.18.1

10 years agoIgnore directories when checking POD encoding
Steve Hay [Mon, 12 Aug 2013 12:56:22 +0000 (13:56 +0100)]
Ignore directories when checking POD encoding

10 years ago[perl #92260] Devel::Peek::fill_mstats and non-PVs
Father Chrysostomos [Sun, 11 Aug 2013 23:09:19 +0000 (16:09 -0700)]
[perl #92260] Devel::Peek::fill_mstats and non-PVs

Devel::Peek::fill_mstats assumed that the argument was >= SVt_PV so
it crashed on brand new undef scalars.  Use sv_grow, instead of
SvGROW.  Since sv_grow also handles COWs, we can remove the special
COW check.

10 years agoconstant.pm: Note that list constants are not
Father Chrysostomos [Sun, 11 Aug 2013 21:10:54 +0000 (14:10 -0700)]
constant.pm: Note that list constants are not

10 years agoMark COWable constants as COWable at compile time
Father Chrysostomos [Sun, 11 Aug 2013 07:02:34 +0000 (00:02 -0700)]
Mark COWable constants as COWable at compile time

This allows ‘$_ = "hello"’ to do COW without having to copy
that constant.

The reason this did not work before is that we never do copy-on-write
with existing read-only scalars that are not already marked COW, as
doing so modifies the string buffer, which the read-only flag may be
intended to protect.

At compile time, most constants start out mutable and are made read-
only in ck_svconst.  So there we can check that the constant is indeed
still mutable (and COWable) and mark it as a COW scalar before making
it read-only.

10 years agoMake Storable support read-only COWs
Father Chrysostomos [Sun, 11 Aug 2013 21:46:55 +0000 (14:46 -0700)]
Make Storable support read-only COWs

Unfortunately, the historical double meaning of SvREADONLY makes
it hard to do the correct thing under all perl versions.

If this proves too problematic for other XS modules, we might need
to forbid read-only COWs, which would be unfortunate, since they
speed things up.

However, a CPAN search reveals nothing outside core for
READONLY.*?(IsCOW|FAKE).

10 years agosv.c:sv_grow: accept read-only COWs
Father Chrysostomos [Sun, 11 Aug 2013 21:38:08 +0000 (14:38 -0700)]
sv.c:sv_grow: accept read-only COWs

sv_grow has long been permitted on read-only scalars.  This stopped
being the case all the time when 9a0a85075 and 1620522e4 allowed read-
nly copy-on-write scalars.  Because sv_force_normal has multiple
uses, sv_grow ended up croaking on *these* read-only scalars, but
not others.

This commit makes things consistent with the way they used to be.

10 years agoDevel::PPPort: force string when testing SvPV_renew
Father Chrysostomos [Sun, 11 Aug 2013 18:15:27 +0000 (11:15 -0700)]
Devel::PPPort: force string when testing SvPV_renew

Otherwise we could be reallocating a buffer shared by another scalar.

10 years agoTest multiline links in diagnostics.t
Father Chrysostomos [Mon, 12 Aug 2013 07:30:51 +0000 (00:30 -0700)]
Test multiline links in diagnostics.t

10 years agoAlphabetise perldiag
Father Chrysostomos [Mon, 12 Aug 2013 07:28:31 +0000 (00:28 -0700)]
Alphabetise perldiag

10 years agoIncrease $diagnostics::VERSION to 1.32
Father Chrysostomos [Mon, 12 Aug 2013 07:28:07 +0000 (00:28 -0700)]
Increase $diagnostics::VERSION to 1.32

10 years agodiagnostics: don’t truncate wrapped links
Father Chrysostomos [Mon, 12 Aug 2013 07:27:14 +0000 (00:27 -0700)]
diagnostics: don’t truncate wrapped links

10 years ago[perl #117355] [lu]cfirst don't respect 'use bytes'
Tony Cook [Mon, 12 Aug 2013 05:28:14 +0000 (15:28 +1000)]
[perl #117355] [lu]cfirst don't respect 'use bytes'

10 years ago[perl #117355] unTODO the [lu]cfirst under bytes tests
Tony Cook [Mon, 15 Jul 2013 06:16:22 +0000 (16:16 +1000)]
[perl #117355] unTODO the [lu]cfirst under bytes tests

10 years agoXXX Patch for discussion: [perl #117355] [lu]cfirst don't respect 'use bytes'
Karl Williamson [Sun, 5 May 2013 02:42:48 +0000 (20:42 -0600)]
XXX Patch for discussion: [perl #117355] [lu]cfirst don't respect 'use bytes'

10 years ago[perl #117355] very basic tests for [ul]c(first)? under use bytes
Tony Cook [Mon, 15 Jul 2013 06:06:46 +0000 (16:06 +1000)]
[perl #117355] very basic tests for [ul]c(first)? under use bytes

the [lu]cfirst tests are TODO due to #117355

10 years ago[perl #3330] warn on increment of an non number/non-magically incable value
Tony Cook [Mon, 12 Aug 2013 02:02:51 +0000 (12:02 +1000)]
[perl #3330] warn on increment of an non number/non-magically incable value

10 years agofix several problems in the MY_CXT example in perlxs.pod
Tony Cook [Mon, 12 Aug 2013 03:21:18 +0000 (13:21 +1000)]
fix several problems in the MY_CXT example in perlxs.pod

- duplicate declaration of name for newMouse

- missing OUTPUT clauses

- use of a member of the context object that doesn't exist in
  get_mouse_name()

- incorrect type assigned to RETVAL in get_mouse_name

- inconsistent indentation

- B<> to mark a heading instead of =headN

10 years agoForgot d_semctl in a429ddf7a2c14d.
Craig A. Berry [Sun, 11 Aug 2013 20:04:52 +0000 (15:04 -0500)]
Forgot d_semctl in a429ddf7a2c14d.

10 years agoadd Alexander Voronov to AUTHORS file
Ricardo Signes [Mon, 12 Aug 2013 00:33:08 +0000 (20:33 -0400)]
add Alexander Voronov to AUTHORS file

10 years agoUpdate perlipc.pod
Alexander Voronov [Thu, 28 Feb 2013 12:25:55 +0000 (16:25 +0400)]
Update perlipc.pod

10 years agoadd Viktor Turskyi to the AUTHORS file
Ricardo Signes [Sun, 11 Aug 2013 23:22:20 +0000 (19:22 -0400)]
add Viktor Turskyi to the AUTHORS file

10 years agoFixed typo (protoytpe => prototype)
Viktor Turskyi [Sun, 19 May 2013 14:19:34 +0000 (17:19 +0300)]
Fixed typo (protoytpe => prototype)

10 years ago[Merge] Fixes to reset("...")
Father Chrysostomos [Sun, 11 Aug 2013 20:45:06 +0000 (13:45 -0700)]
[Merge] Fixes to reset("...")

I tried to make copy-on-write more pervasive, and reset.t started
failing.  So I found myself reworking sv_resetpvn (i.e., deleting
parts of it).

10 years agoDon’t taint undef in reset
Father Chrysostomos [Sun, 11 Aug 2013 20:43:57 +0000 (13:43 -0700)]
Don’t taint undef in reset

reset was tainting undef if the internal SV type happened to be SVt_PV
or higher.  This has got to have been a mistake.  Tainting undef or
what is known to be an empty string does not make sense, even in a
tainted expression.  Tainting it based on the internal type does not
make sense either, and results in inconsistencies in behaviour (taint
it if it *was* a string, even though it isn’t now, but not if it was a
number, unless that number was tied, or had pos() set, etc.).

This tainting has been here since perl 3.0 (commit a687059cb), which I
think was when tainting was introduced.

Applying the tainting based on the internal type has happened since
79072805bf6 (perl 5.0 alpha 2), which introduced different internal
SV types.

10 years agoRemove special string handling from sv.c:sv_reset
Father Chrysostomos [Sun, 11 Aug 2013 20:14:03 +0000 (13:14 -0700)]
Remove special string handling from sv.c:sv_reset

Once upon a time, "" and undef were equivalent, and str_reset (as it
was called) would turn a scalar into an empty string.

Since commit 79072805bf6 (perl 5.0 alpha 2), sv_reset has set sca-
lars to undef.

Setting SvCUR to 0 and *SvPVX to '\0' (converted from str->cur and
str->ptr[0] by the same commit 79072805bf6) has not been neces-
sary since.

10 years agosv.c:sv_reset: Remove %ENV handling; fix for VMS
Father Chrysostomos [Sun, 11 Aug 2013 19:51:10 +0000 (12:51 -0700)]
sv.c:sv_reset: Remove %ENV handling; fix for VMS

The special env handling (calling my_clearenv) in sv_reset is com-
pletely unnecessary, because
 • sv_reset calls hv_clear
 • hv_clear calls mg_clear for magical arrays
 • mg_clear calls magic_set_all_env for %ENV
 • magic_set_all_env calls my_clearenv
so it gets called twice (confirmed with gdb breakpoints).

The VMS handling in sv_reset was wrong, because it was not even inside
the if(gv==PL_envgv) condition.  It was croaking for any hash, not
just %ENV (the fault of commit b0269e46d).  (This was based on code
inspection; not actually tested.)

Handling %ENV specially in sv_reset has been unnecessary since ‘clear’
magic was added to %ENV in commit fb73857aa (inseparable changes from
patch to perl 5.004_04).