This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
9 years agoDocument grok_atou as strtoul replacement.
Jarkko Hietaniemi [Mon, 21 Jul 2014 19:15:42 +0000 (15:15 -0400)]
Document grok_atou as strtoul replacement.

9 years agoUse grok_atou instead of strtoul (no explicit strtol uses).
Jarkko Hietaniemi [Mon, 21 Jul 2014 18:59:58 +0000 (14:59 -0400)]
Use grok_atou instead of strtoul (no explicit strtol uses).

9 years agoAdvertise grok_atou.
Jarkko Hietaniemi [Mon, 21 Jul 2014 14:56:49 +0000 (10:56 -0400)]
Advertise grok_atou.

9 years agoAdd atoi to avoidables.
Jarkko Hietaniemi [Mon, 21 Jul 2014 14:53:10 +0000 (10:53 -0400)]
Add atoi to avoidables.

9 years agoAdd tests for grok_atou.
Jarkko Hietaniemi [Mon, 21 Jul 2014 14:07:05 +0000 (10:07 -0400)]
Add tests for grok_atou.

9 years agoUse grok_atou instead of atoi.
Jarkko Hietaniemi [Mon, 21 Jul 2014 14:50:54 +0000 (10:50 -0400)]
Use grok_atou instead of atoi.

Remaining atoi() uses include at least:
ext/DynaLoader/dl_aix.xs, os2/os2.c, vms/vms.c

9 years agoImplement grok_atou as safe/strict atoi replacement.
Jarkko Hietaniemi [Mon, 21 Jul 2014 14:41:20 +0000 (10:41 -0400)]
Implement grok_atou as safe/strict atoi replacement.

For earlier discussion, see:
http://www.nntp.perl.org/group/perl.perl5.porters/2013/10/msg208680.html
https://rt.perl.org/Public/Bug/Display.html?id=116118#txn-1250187

grok_atou is completely new code, instead of trying to bolt
new parameters/flags to grok_number.  This makes it easier to
be extremely strict, and not worry about breaking grok_number.

9 years agoUse %I64d instead of %lld for MinGW
Jan Dubois [Tue, 22 Jul 2014 23:50:24 +0000 (16:50 -0700)]
Use %I64d instead of %lld for MinGW

For older versions of MSVCRT.dll %lld is still using only 32 bits, breaking
32-bit builds defining USE_64_BIT_INT. %I64d is still supported on all newer
MSVCRT.dll releases, so there is really no reason to use %lld with MinGW at
all.

Fixes https://rt.perl.org/Ticket/Display.html?id=120851

9 years agoperlexperiment mentions features a lot, refer to the feature module
Alberto Simões [Tue, 22 Jul 2014 23:44:25 +0000 (09:44 +1000)]
perlexperiment mentions features a lot, refer to the feature module

9 years ago_LIB_VERSION scan was trying leading address twice.
Jarkko Hietaniemi [Tue, 22 Jul 2014 21:22:57 +0000 (17:22 -0400)]
_LIB_VERSION scan was trying leading address twice.

Important with PERL_GLOBAL_STRUCT_PRIVATE.

9 years agoMention libperl.t, and explain nm output some more.
Jarkko Hietaniemi [Tue, 22 Jul 2014 12:13:24 +0000 (08:13 -0400)]
Mention libperl.t, and explain nm output some more.

9 years agoMove two variable assignments outside of parens.
James E Keenan [Tue, 22 Jul 2014 01:02:53 +0000 (21:02 -0400)]
Move two variable assignments outside of parens.

Done for readability. Remove some unused variables. Move declaration of other
variable closer to where it is used. Rationalize indentation on lines
modified. Increment $VERSION.

For: RT #122282 (additional)

9 years agoOpen3.pm:spawn_with_handles remove alot of duplicate operators
Daniel Dragan [Sun, 13 Jul 2014 12:41:15 +0000 (08:41 -0400)]
Open3.pm:spawn_with_handles remove alot of duplicate operators

dont call fileno twice, don't deref key "open_as" 3 extra times.

9 years agoAvoid undefined warnings.
Jarkko Hietaniemi [Tue, 22 Jul 2014 01:12:09 +0000 (21:12 -0400)]
Avoid undefined warnings.

9 years agoIn FreeBSD memcmp symbol can disappear.
Jarkko Hietaniemi [Mon, 21 Jul 2014 17:29:27 +0000 (13:29 -0400)]
In FreeBSD memcmp symbol can disappear.

9 years agosv.h: Document SVt_INVLIST fields
Karl Williamson [Mon, 21 Jul 2014 15:43:04 +0000 (09:43 -0600)]
sv.h: Document SVt_INVLIST fields

9 years agoutf8_heavy.pl: Fix nit in comment
Karl Williamson [Tue, 8 Jul 2014 16:29:13 +0000 (10:29 -0600)]
utf8_heavy.pl: Fix nit in comment

9 years agocpan/Time-HiRes/t/itimer.t: better diagnostics
David Mitchell [Mon, 21 Jul 2014 15:02:23 +0000 (16:02 +0100)]
cpan/Time-HiRes/t/itimer.t: better diagnostics

This test is failing some smokes. Add better diagnostics to see what's
going on.

Since this is a CPAN-first module, this commit either needs backing out at
some point, or merging upstream.

9 years agoDisallow importing functions from UNIVERSAL
Dagfinn Ilmari Mannsåker [Sun, 8 Jun 2014 00:37:32 +0000 (01:37 +0100)]
Disallow importing functions from UNIVERSAL

It's been deprecated since v5.12.

9 years agoRegen podcheck db for new long verbatims in perlepigraph
Karl Williamson [Sun, 20 Jul 2014 16:38:25 +0000 (10:38 -0600)]
Regen podcheck db for new long verbatims in perlepigraph

9 years agoperlop: Grammatical nit.
Karl Williamson [Tue, 15 Jul 2014 22:05:12 +0000 (16:05 -0600)]
perlop: Grammatical nit.

'either' refers only to one of two possibilities.  Since this
has more than that, 'either' is grammatically incorrect.

9 years agoUpped version numbers for ModuleList
Abigail [Sun, 20 Jul 2014 15:25:04 +0000 (17:25 +0200)]
Upped version numbers for ModuleList

9 years agoBump version number from 5.21.2 to 5.21.3
Abigail [Sun, 20 Jul 2014 15:12:05 +0000 (17:12 +0200)]
Bump version number from 5.21.2 to 5.21.3

9 years agoNew perldelta.
Abigail [Sun, 20 Jul 2014 14:51:11 +0000 (16:51 +0200)]
New perldelta.

9 years agoInstalling Inline no longer installs Inline::C.
Abigail [Sun, 20 Jul 2014 12:43:59 +0000 (14:43 +0200)]
Installing Inline no longer installs Inline::C.

So, when testing cpan, install Inline::C.

9 years agoEpigraph for 5.21.2
Abigail [Sun, 20 Jul 2014 14:36:36 +0000 (16:36 +0200)]
Epigraph for 5.21.2

9 years agoMerge branch 'release-5.21.2' into blead
Abigail [Sun, 20 Jul 2014 14:16:38 +0000 (16:16 +0200)]
Merge branch 'release-5.21.2' into blead

Conflicts:
t/porting/libperl.t

9 years agoWarn against tmpfile, and mention perlclib.
Jarkko Hietaniemi [Sun, 20 Jul 2014 13:10:27 +0000 (09:10 -0400)]
Warn against tmpfile, and mention perlclib.

9 years agoSkip symbols for which Configure found no support.
Jarkko Hietaniemi [Sun, 20 Jul 2014 12:00:59 +0000 (08:00 -0400)]
Skip symbols for which Configure found no support.

9 years agoComments for dlopen.
Jarkko Hietaniemi [Sun, 20 Jul 2014 11:33:12 +0000 (07:33 -0400)]
Comments for dlopen.

9 years agoExpect sqrtl instead of sqrt if applicable.
Jarkko Hietaniemi [Sun, 20 Jul 2014 11:30:17 +0000 (07:30 -0400)]
Expect sqrtl instead of sqrt if applicable.

9 years agoAdjust 31e62fa1f35be3aceacc7fa62ce72d7131299a9a v5.21.2
Abigail [Sun, 20 Jul 2014 11:33:42 +0000 (13:33 +0200)]
Adjust 31e62fa1f35be3aceacc7fa62ce72d7131299a9a

It seems that 'sqrt' is not always called as a system call, in particular,
when compiling with -Dusemorebits

9 years agoAdd new release to perlhist
Abigail [Sun, 20 Jul 2014 02:08:08 +0000 (04:08 +0200)]
Add new release to perlhist

9 years agoAcknowledgement section of perldelta
Abigail [Sun, 20 Jul 2014 01:50:54 +0000 (03:50 +0200)]
Acknowledgement section of perldelta

9 years agoListed updated modules.
Abigail [Sun, 20 Jul 2014 01:42:20 +0000 (03:42 +0200)]
Listed updated modules.

9 years agoUpdate Module::CoreList for 5.21.2
Abigail [Sun, 20 Jul 2014 01:05:59 +0000 (03:05 +0200)]
Update Module::CoreList for 5.21.2

9 years agoRevert "Update HTTP-Tiny to CPAN version 0.044"
Abigail [Sat, 19 Jul 2014 22:50:34 +0000 (00:50 +0200)]
Revert "Update HTTP-Tiny to CPAN version 0.044"

This reverts commit 43bf4e6652b9fc743b1dbbc5153ced8b08779e84.

HTTP::Tiny contains tests that requires a connection to www.example.com.
These tests fail if run behind a firewall.

9 years agoAdd fgets+tmpfile to avoidables, and add comments.
Jarkko Hietaniemi [Sat, 19 Jul 2014 14:03:15 +0000 (14:03 +0000)]
Add fgets+tmpfile to avoidables, and add comments.

9 years agoAdd freebsd support.
Jarkko Hietaniemi [Sat, 19 Jul 2014 13:51:38 +0000 (13:51 +0000)]
Add freebsd support.

9 years agoParsing linux input in darwin, and vice versa.
Jarkko Hietaniemi [Thu, 17 Jul 2014 10:23:21 +0000 (10:23 +0000)]
Parsing linux input in darwin, and vice versa.

9 years agoAdd comments.
Jarkko Hietaniemi [Wed, 16 Jul 2014 07:17:06 +0000 (07:17 +0000)]
Add comments.

9 years agoScan for expected and unwanted undef (libc) symbols.
Jarkko Hietaniemi [Sun, 13 Jul 2014 13:13:30 +0000 (16:13 +0300)]
Scan for expected and unwanted undef (libc) symbols.

We would expect to see e.g. chmod() being used,
but we do not want to see e.g. gets() being used, ever.

9 years agoSometimes Darwin has the string constants in cstring section.
Jarkko Hietaniemi [Mon, 14 Jul 2014 21:31:19 +0000 (21:31 +0000)]
Sometimes Darwin has the string constants in cstring section.

At least in OS X 10.7.

Resolves the darwin x86 part of RT #12267 (the failing PL_no_mem test).

9 years agotest.pl:eq_array() is enough.
Jarkko Hietaniemi [Sun, 13 Jul 2014 12:44:33 +0000 (15:44 +0300)]
test.pl:eq_array() is enough.

No bad is_deeply() emulation necessary.

9 years agoMore debugging output.
Jarkko Hietaniemi [Sun, 13 Jul 2014 06:00:58 +0000 (09:00 +0300)]
More debugging output.

9 years agoHandle darwin ppc nm output, reenable test.
Jarkko Hietaniemi [Sun, 13 Jul 2014 05:57:45 +0000 (08:57 +0300)]
Handle darwin ppc nm output, reenable test.

Not darwin ppc in particular: handle 32-bit nm output, in general.
Resolves part of RT #122267.

9 years agoAllow reading nm output from a file (or STDIN).
Jarkko Hietaniemi [Sun, 13 Jul 2014 05:49:50 +0000 (08:49 +0300)]
Allow reading nm output from a file (or STDIN).

9 years agoChanges for 5.21.1 -> 5.21.2.
Abigail [Sat, 19 Jul 2014 21:25:34 +0000 (23:25 +0200)]
Changes for 5.21.1 -> 5.21.2.

Not included the parts that are automated (module changes and acknowledgements).

9 years agoTick off the 5.20.0 and 5.20.1 releases.
Abigail [Sat, 19 Jul 2014 16:36:11 +0000 (18:36 +0200)]
Tick off the 5.20.0 and 5.20.1 releases.

9 years ago"all question marks" is ambigious.
Abigail [Sat, 19 Jul 2014 16:34:08 +0000 (18:34 +0200)]
"all question marks" is ambigious.

Because if just a single question mark is used, it means the release
manager is unknown. Only if multiple question marks are used it
means it isn't known whether this release will happen.

9 years agoperlpolicy - Add encoding to fix podcheck.t following 0c6082f411
Steve Hay [Fri, 18 Jul 2014 14:59:34 +0000 (15:59 +0100)]
perlpolicy - Add encoding to fix podcheck.t following 0c6082f411

9 years agoperlpolicy: update list of moderators
Ricardo Signes [Fri, 18 Jul 2014 13:03:52 +0000 (09:03 -0400)]
perlpolicy: update list of moderators

9 years agoNote that ExtUtils::Manifest has been upgraded to 1.64
Steve Hay [Fri, 18 Jul 2014 07:48:32 +0000 (08:48 +0100)]
Note that ExtUtils::Manifest has been upgraded to 1.64

The EXCLUDED files are also now different.

9 years agoperlpolicy - Note that minimal build fixes are acceptable for maint too
Steve Hay [Fri, 18 Jul 2014 07:36:15 +0000 (08:36 +0100)]
perlpolicy - Note that minimal build fixes are acceptable for maint too

Changes like 31114fe991, which has just been cherry-picked into maint-5.20,
should be allowed.

9 years agouconfig.h again
H.Merijn Brand [Thu, 17 Jul 2014 12:45:47 +0000 (14:45 +0200)]
uconfig.h again

I am so sorry

9 years agocut-n-paste error in comment for dladdr in config_h.SH for Condifure
H.Merijn Brand [Thu, 17 Jul 2014 12:31:43 +0000 (14:31 +0200)]
cut-n-paste error in comment for dladdr in config_h.SH for Condifure

9 years agoUpdate HTTP-Tiny to CPAN version 0.044
Chris 'BinGOs' Williams [Thu, 17 Jul 2014 10:24:32 +0000 (11:24 +0100)]
Update HTTP-Tiny to CPAN version 0.044

  [DELTA]

0.044     2014-07-16 23:46:09-04:00 America/New_York

    [CHANGED]

    - Providing a custom 'Host' header is now a fatal exception.  Previously, it
      was silently ignored, as the RFC mandates that Host be set from the
      URL, but ignoring it could lead to unexpected, confusing errors.

    - optimized URL splitting

    - Passing 'undef' for any proxy attribute will prevent HTTP::Tiny from
      setting the proxy from the environment.

9 years agoMerge branch '122300-extutils-manifest' into blead
James E Keenan [Tue, 15 Jul 2014 22:54:47 +0000 (18:54 -0400)]
Merge branch '122300-extutils-manifest' into blead

9 years agouse just the import sub from Exporter
Karen Etheridge [Tue, 15 Jul 2014 00:25:46 +0000 (17:25 -0700)]
use just the import sub from Exporter

9 years agoNeed to increment $VERSION in ExtUtils::Manifest.
James E Keenan [Tue, 15 Jul 2014 22:36:29 +0000 (18:36 -0400)]
Need to increment $VERSION in ExtUtils::Manifest.

9 years agouse warnings; convert "use vars" to "our"
Karen Etheridge [Tue, 15 Jul 2014 00:19:36 +0000 (17:19 -0700)]
use warnings; convert "use vars" to "our"

9 years agoadd vim swap files to the ignored list for MANIFEST.SKIP.
Karen Etheridge [Mon, 30 Jan 2012 21:04:43 +0000 (13:04 -0800)]
add vim swap files to the ignored list for MANIFEST.SKIP.

9 years agoRT 72933: Ignore files from prove
brian d foy [Tue, 6 Dec 2011 09:42:43 +0000 (03:42 -0600)]
RT 72933: Ignore files from prove

9 years agoThis should be automated!
H.Merijn Brand [Tue, 15 Jul 2014 14:17:48 +0000 (16:17 +0200)]
This should be automated!

9 years agoRegen Configure after backports
H.Merijn Brand [Tue, 15 Jul 2014 14:05:53 +0000 (16:05 +0200)]
Regen Configure after backports

9 years agoFile::Copy does not overwrite read-only files
Alexandr Ciornii [Sun, 16 Mar 2014 12:12:42 +0000 (14:12 +0200)]
File::Copy does not overwrite read-only files

9 years agorefactor pp_ref
Daniel Dragan [Sun, 13 Jul 2014 10:48:25 +0000 (06:48 -0400)]
refactor pp_ref

similar to commmit b3cf48215c

-removed:
  -4/-8 pop on SP
  +4/+8 push on SP
  PUTBACK
  1 non vol register save/restore (TARG not saved across the sv_ref())

TARG is not computed if the SV isn't a reference, so the PL_sv_no branch is
slightly faster. On VC 2003 32 bit miniperl, this func dropped from 0x6D to
0x58 bytes of machine code.

9 years agooptimize PathTools to not try to load XS on miniperl
Daniel Dragan [Mon, 14 Jul 2014 05:10:52 +0000 (15:10 +1000)]
optimize PathTools to not try to load XS on miniperl

this will slightly speed up perl's build time by not loading XSLoader.pm
and DynaLoader.pm into the process, and then die()+eval trap when trying
to load the XS module.

Tony: update perldelta message to avoid a broken link

9 years agoskip_all on darwin until nm peculiarities can be straighted out.
James E Keenan [Sun, 13 Jul 2014 02:16:23 +0000 (22:16 -0400)]
skip_all on darwin until nm peculiarities can be straighted out.

For: RT #122267

9 years agolocale.c: Improve some comments
Karl Williamson [Fri, 11 Jul 2014 22:33:26 +0000 (16:33 -0600)]
locale.c: Improve some comments

9 years agolocale.c: Fix some unused code for potential future use
Karl Williamson [Fri, 11 Jul 2014 22:29:54 +0000 (16:29 -0600)]
locale.c: Fix some unused code for potential future use

This code extends the heuristics used to determine if a locale is UTF-8
or not on older platforms.  It has been #ifdef'd out because it only
added a little value on dromedary.  Now the previous commit has added
new heuristics, and tests on dromedary show that this adds nothing to
that.  But I'm leaving it in the source in case it might ever prove
useful.  In order to test it, I compiled it and found some problems with
the earlier version that this now fixes.

9 years agolocale.c: Add new heuristic for finding if locale is UTF-8
Karl Williamson [Fri, 11 Jul 2014 22:24:39 +0000 (16:24 -0600)]
locale.c: Add new heuristic for finding if locale is UTF-8

On older platforms that don't conform to POSIX 2001 nor C99, heuristics
are employed to try to determine if a locale is UTF-8 or not.  This
commit improves those heuristics by looking at names of the months and
days of the week to see if they are UTF-8 or not.  This is done if
looking at the currency symbol failed to help.

9 years agolocale.c: White-space only
Karl Williamson [Fri, 11 Jul 2014 22:23:10 +0000 (16:23 -0600)]
locale.c: White-space only

Indent and outdent blocks of code to conform to newly formed or removed
braces

9 years agolocale.c: Refactor UTF8ness of currency symbol code
Karl Williamson [Fri, 11 Jul 2014 22:12:22 +0000 (16:12 -0600)]
locale.c: Refactor UTF8ness of currency symbol code

On older platforms that aren't C99 nor POSIX 2001, locale.c uses the
currency symbol to try to see if a locale is UTF-8 or not.  This commit
refactors it somewhat to make it cleaner, and which fixes several
problems.  The least issue was that it sometimes did a setlocale()
unnecessarily.  Others are that in some circumstances it called
localeconv() and/or looked at the result while within the wrong locale.

9 years agolocale.c: Use ptr's value before freeing it, not after
Karl Williamson [Fri, 11 Jul 2014 21:56:51 +0000 (15:56 -0600)]
locale.c: Use ptr's value before freeing it, not after

This only affected runs with the -DL parameter to perl set.

9 years agolocale.c: Use safer code practice
Karl Williamson [Fri, 11 Jul 2014 21:54:38 +0000 (15:54 -0600)]
locale.c: Use safer code practice

The interior-most function can return NULL.  Currently savepv() which is
the next outer function handles this correctly, as does the next outer
function, but it is dangerous to rely on that behavior.  So we test for
NULL before calling functions on a NULL ptr.

9 years agolocale.c: Skip compiling fallback code on modern platforms
Karl Williamson [Fri, 11 Jul 2014 21:42:21 +0000 (15:42 -0600)]
locale.c: Skip compiling fallback code on modern platforms

In the function that determines if a POSIX locale is UTF-8 or not, if
either nl_langinfo or MB_CUR_MAX are defined, it can reliably determine
the answer.  If they are not defined, it uses heuristics to figure
things out as best it can.  This code doesn't add value for those
platforms where one of the two symbols is defined, so can just be
ifdef'd out

9 years agoutil.c: Add comment
Karl Williamson [Fri, 11 Jul 2014 21:39:02 +0000 (15:39 -0600)]
util.c: Add comment

9 years agolocale.c: name should be last resort when deciding if locale is utf8
Karl Williamson [Wed, 9 Jul 2014 19:36:28 +0000 (13:36 -0600)]
locale.c: name should be last resort when deciding if locale is utf8

Looking at if the currency symbol is UTF-8 should come ahead of looking
at the locale name.

9 years agolocale.c: Prepare for rearrangement of code blocks
Karl Williamson [Wed, 9 Jul 2014 19:22:17 +0000 (13:22 -0600)]
locale.c: Prepare for rearrangement of code blocks

This section of code just returned generally,.  This commit changes it
so that it drops off the end if it can't determine if the current locale
is UTF-8 or not, so that additional tests can be added later.  The
function defaults to not UTF-8 if this drops off the end, so there
should be no functionality change

9 years agoperl.h: Actually #define USE_LOCALE_TIME
Karl Williamson [Wed, 9 Jul 2014 17:26:26 +0000 (11:26 -0600)]
perl.h: Actually #define USE_LOCALE_TIME

This symbol is used, but was never defined

9 years agoUpgrade IO-Socket-IP from version 0.30 to 0.31
Steve Hay [Fri, 11 Jul 2014 07:51:42 +0000 (08:51 +0100)]
Upgrade IO-Socket-IP from version 0.30 to 0.31

(perldelta: Say we're upgrading from 0.29 since we've already upgraded from
that since 5.21.0.)

9 years agoRemove IGNORABLE files from IO-Socket-IP as per 8db6555210
Steve Hay [Fri, 11 Jul 2014 07:51:23 +0000 (08:51 +0100)]
Remove IGNORABLE files from IO-Socket-IP as per 8db6555210

9 years agolocale.c: Fix misplaced parenthesis
Karl Williamson [Thu, 10 Jul 2014 19:31:11 +0000 (13:31 -0600)]
locale.c: Fix misplaced parenthesis

Commit a39edc4c877304d4075679b1d8de1904671a9c37 got a parenthesis
misplaced so it wasn't really looking at the next character, like it was
supposed to be doing

9 years agot/run/locale.t: setting to POSIX may be same as C
Karl Williamson [Wed, 9 Jul 2014 15:38:00 +0000 (09:38 -0600)]
t/run/locale.t: setting to POSIX may be same as C

On some (? all) systems, setting the locale to POSIX may cause it to
actually set it to C.  In these tests we want to exclude C, hence we
have to exclude POSIX as well.

Some systems may not have any other locales, so this commit also
properly skips tests on those.

Thanks to Matthew Horsfall for figuring this out

9 years agot/loc_tools.pl: Don't return a locale empty string
Karl Williamson [Wed, 9 Jul 2014 15:35:06 +0000 (09:35 -0600)]
t/loc_tools.pl: Don't return a locale empty string

A locale name shouldn't be an empty string; this makes sure
that some glitch that introduces one doesn't get passed on

9 years agoext/POSIX/POSIX.xs: White space only, align column
Karl Williamson [Mon, 7 Jul 2014 21:46:49 +0000 (15:46 -0600)]
ext/POSIX/POSIX.xs: White space only, align column

9 years agoPOSIX::setlocale(LC_NUMERIC) returns proper locale
Karl Williamson [Mon, 7 Jul 2014 21:14:49 +0000 (15:14 -0600)]
POSIX::setlocale(LC_NUMERIC) returns proper locale

Commit 4c28b29c7a1549f173177cdf69e91cc1acaa0969 broke calling setlocale
with a single parameter and hoping to get the correct LC_NUMERIC
property returned from it (including LC_ALL calls).  This is because the
numeric locale is now kept as C except around the code that wants it to
be the underlying locale.  It turns out that querying the current locale
is such a code area, so LC_NUMERIC is now set to the underlying locale
around this.

9 years agolocale.c: White-space only
Karl Williamson [Mon, 7 Jul 2014 20:42:11 +0000 (14:42 -0600)]
locale.c: White-space only

Outdent because the previous commit removed the enclosing block.

9 years agolocale.c: Remove conditionals.
Karl Williamson [Mon, 7 Jul 2014 20:38:08 +0000 (14:38 -0600)]
locale.c: Remove conditionals.

These two functions are supposed to normally be called through macro
interfaces which check whether they actually should be called or not.
That means the conditionals removed by this commit are redundant from
the normal interface.   By removing them, we allow the exceptional case
where the code should be executed unconditionally, to happen, by just
calling the functions directly, not using the macro interface.

9 years agolocale.c: Keep better track of C/non-C locale
Karl Williamson [Mon, 7 Jul 2014 20:30:59 +0000 (14:30 -0600)]
locale.c: Keep better track of C/non-C locale

Perl uses three interpreter-level (but private) variables to keep track
of numeric locales.  PL_numeric name is the current underlying locale.
PL_standard is a boolean to indicate if we are switched to the C (or
POSIX) locale, and PL_local is a boolean to indicate if we are switched
to the underlying one.  The reason there are two booleans is if the
underlying locale is C, both can be true at the same time.  But the code
that is being changed by this commit didn't realize this, and
could unnecessarily set the booleans to FALSE.  This could cause
unnecessary switching of locales.

9 years agolocale.c: Make a common idiom into a macro
Karl Williamson [Mon, 7 Jul 2014 20:21:30 +0000 (14:21 -0600)]
locale.c: Make a common idiom into a macro

9 years agolib/locale.t: Fix debug statement
Karl Williamson [Mon, 7 Jul 2014 19:59:30 +0000 (13:59 -0600)]
lib/locale.t: Fix debug statement

This was printing using the wrong function.  It is a string, and should
use the string output function.

9 years agoutf8.h: Add comment
Karl Williamson [Sun, 29 Jun 2014 03:43:02 +0000 (21:43 -0600)]
utf8.h: Add comment

9 years agoUpdate which stable release series are now "officially" supported
Steve Hay [Wed, 9 Jul 2014 07:36:32 +0000 (08:36 +0100)]
Update which stable release series are now "officially" supported

9 years agoFix typo in op.h
Aaron Crane [Tue, 8 Jul 2014 23:33:47 +0000 (00:33 +0100)]
Fix typo in op.h

This caused all OP structures to be larger than intended; for example, it
made `struct op` 48 bytes rather than 40 on Mac OS X x86-64.

9 years ago[Merge] add support for ops to link to parent
David Mitchell [Tue, 8 Jul 2014 15:44:53 +0000 (16:44 +0100)]
[Merge] add support for ops to link to parent

This series of commits provides experimental support for ops in the optree
to be able to locate their parent op, if any.

First, it adds a new general-purpose function, op_sibling_splice(),
which allows for general manipulation of an op_sibling chain by analogy
with the perl splice() function. op.c has then been heavily refactored to
use this function rather than manipulating ops directly.

Then the boolean field op_lastsib has been added to OPs. Within the core,
this is set on the last op in an op_sibling chain (so it is synonymous
with op_sibling being null). By default, its value is set but not used.

In addition, a new build define has been added (not yet enabled by default),
-DPERL_OP_PARENT, that forces the core to use op_lastsib to detect the
last op in a sibling chain, rather than op_sibling being NULL. This frees
up the last op_sibling pointer in the chain, which rather than being set
to NULL, is now set to point back to the parent of the sibling chain (if
any).

Then add a C-level op_parent() function and B parent() method; under
default builds they just return NULL, under PERL_OP_PARENT they return the
parent of the current op.

Collectively this provides a facility not previously available from B:: nor
C, of being able to follow an op tree up as well as down.

Also, some assertions are added to finalize_op() that check the
consistency of the optree; in particular that op_last points to the last
sibling. Under -DPERL_OP_PARENT, more checks are enabled.

9 years agoavoid adding two OP_HINTSEVAL ops
David Mitchell [Tue, 1 Jul 2014 14:42:42 +0000 (15:42 +0100)]
avoid adding two OP_HINTSEVAL ops

Under argless eval (i.e. defaults to $_) in the presence of hints,
the perl core was recursively calling ck_eval, which had the side-effect
of attempting to append an OP_HINTSEVAL op twice. Formerly due to the way
the appending was done, the first OP_HINTSEVAL op was silently discarded;
after doing things "properly" with op_sibling_splice(), both ops ended up
being appended, and at run-time, the hints hash would be interpreted as
the SV to eval.

This wasn't tested in the core tests, and just ended up sometimes failing
warnings.t or Digest-SHA tests (but never on my system!)

9 years agominor fixups to new op_sibling work
David Mitchell [Tue, 1 Jul 2014 12:23:50 +0000 (13:23 +0100)]
minor fixups to new op_sibling work

remove pTHX args to op_parent() and op_sibling_splice() since they don't
use them, and cast an op type assignment. Also, minor fixups to the pod
for op_sibling_splice().

9 years agoImprove optree sanity checking code in finalize_op
David Mitchell [Mon, 30 Jun 2014 16:06:26 +0000 (17:06 +0100)]
Improve optree sanity checking code in finalize_op

The previous couple of commits added DEBUGGING code to finalize_op() that
checked, for BINOP/LISTOPs etc, that all the op's children had consistent
flags and that op_last pointed to the last op (and vice-versa under
PERL_OP_PARENT).  Extend most of this consistency checking to the various
classes of OP that have op_first but not op_last (like UNOP, LOGOP).