In perl.git, the branch smoke-me/khw-nlocale has been created
<http://perl5.git.perl.org/perl.git/commitdiff/e6f5a490781499e7a4cbf440711ac9c299bb2c79?hp=0000000000000000000000000000000000000000>
at e6f5a490781499e7a4cbf440711ac9c299bb2c79 (commit)
- Log -----------------------------------------------------------------
commit e6f5a490781499e7a4cbf440711ac9c299bb2c79
Author: Karl Williamson <[email protected]>
Date: Mon Jun 2 15:56:05 2014 -0600
smoke
M embed.fnc
M embed.h
M lib/locale.t
M locale.c
M mg.c
M proto.h
M util.c
commit 57b1320c6dfb4d0c6a7be2521bc3c672c20db2d1
Author: Karl Williamson <[email protected]>
Date: Mon Jun 2 15:04:54 2014 -0600
smoke
M mg.c
commit 2eff1daabbbdcd106b57cdeea868d8836cfdb609
Author: Karl Williamson <[email protected]>
Date: Mon Jun 2 15:00:05 2014 -0600
Data::Dumper: Fix wrong #if
The code being conditionally compiled is for LC_COLLATE, not LC_NUMERIC
M dist/Data-Dumper/Dumper.xs
commit 987300860708afef31ee962a32a788af739606b1
Author: Karl Williamson <[email protected]>
Date: Mon Jun 2 14:49:30 2014 -0600
XXX date is Dumper.xs Add parameters to "use locale"
This commit allows one to specify to enable locale-awareness for only a
specified subset of the locale categories. Thus you could make a
section of code LC_MESSAGES aware, with no locale-awareness for the
other categories.
M dist/Data-Dumper/Dumper.pm
M dist/Data-Dumper/Dumper.xs
M embed.fnc
M embed.h
M ext/POSIX/lib/POSIX.pod
M lib/locale.pm
M locale.c
M numeric.c
M op.c
M perl.h
M pod/perldelta.pod
M pod/perlembed.pod
M pod/perlfunc.pod
M pod/perllocale.pod
M pp.c
M pp_sort.c
M pp_sys.c
M proto.h
M t/run/locale.t
M utf8.h
commit 663be03930abb82d4e71b2e82e63b1b7e8b84c35
Author: Karl Williamson <[email protected]>
Date: Mon Jun 2 13:52:38 2014 -0600
numeric.c: Remove unnecessary test
The second test won't be true unless the first one is (but not vice
versa), so no need to test the first.
M numeric.c
commit 0a9e612c4f66fff17164aebce53f204d176d825f
Author: Karl Williamson <[email protected]>
Date: Mon Jun 2 12:15:47 2014 -0600
op.c: Use macro instead of its expansion
It's better to use a pre-defined macro when available. This isn't quite
the same as the macro is valid for both run-time and compile-time and
the code is only compile-time. In the unlikely event that this were
ever to be found to be other than negligible, a compile-time-only
version of the macro could be created.
M op.c
commit 50bea3db83d9370ed05ddcf339709a435b7e9538
Author: Karl Williamson <[email protected]>
Date: Sun Jun 1 20:07:30 2014 -0600
XXX cpan upstream Allow dynamic lock of LC_NUMERIC
When processing version strings, the radix character must be a dot even
if we otherwise would be using some other character. vutil.c
upg_version() changes to the dot, but calls sv_catpvf() which may try to
change the character to something else. This commit introduces a way to
lock the character to a dot around the call to sv_catpvf()
M intrpvar.h
M locale.c
M perl.h
M t/porting/customized.dat
M vutil.c
commit 38f0f8220592106e3a4523f4beee924e07e7a293
Author: Karl Williamson <[email protected]>
Date: Sun Jun 1 19:40:12 2014 -0600
Fix up LC_NUMERIC wrap macros
perl.h has some macros used to manipulate the locale exposed for the
category LC_NUMERIC. These are currently undocumented, but will need to
be documented as the development of 5.21 progresses. This fixes these
up in several ways:
The tests for if we are in the correct state are
made into macros. This is in preparation for the next commit, which
will make one of them more complicated, and so that complication will
only have to be in one place.
The variable declared by them is renamed to be preceeded by an
underscore. It is dangerous practice to have a name used in a macro, as
it could conflict with a name used by outside code. This alleviates it
somewhat by making it even less likely to conflict. This will have to
be revisited when some of these macros are made part of the public API.
The tests to see if things need to change are reversed. Previously we
said we need to change to standard, for example, if the variable for
'local' is set. But both can be true at the same time if the underlying
locale is C. In this case, wwe only need to change if we aren't in
standard. Whether that is also local is irrelevant.
M locale.c
M perl.h
commit e7266127ba08438523fe4a65bcafc7e689b8c9d7
Author: Karl Williamson <[email protected]>
Date: Sun Jun 1 14:05:48 2014 -0600
Keep LC_NUMERIC in C locale, except for brief periods
This is for XS modules, so they don't have to worry about the radix
being a non-dot. When the locale needs to be in the underlying one, the
operation should be wrapped using macros for the purpose. That API may
change as we gain experience in 5.21, so I'm not including it now.
M MANIFEST
M ext/XS-APItest/APItest.xs
A ext/XS-APItest/t/locale.t
M locale.c
M perl.c
M pod/perldelta.pod
M pod/perllocale.pod
commit 064b07f7bf0ac11ea77896d905f81f54ed1afa7a
Author: Karl Williamson <[email protected]>
Date: Sun Jun 1 18:07:34 2014 -0600
perllocale: Wrap some text in C<...>
M pod/perllocale.pod
commit bb3eaabfdade790647b7b9240d6ed1815b0e2c53
Author: Karl Williamson <[email protected]>
Date: Sun Jun 1 16:05:20 2014 -0600
numeric.c: White-space only
The previous commit added a block around this code, so indent
correspondingly.
M numeric.c
commit d387b366f20fa6d60b0dd37ea4ff6033b56cbda1
Author: Karl Williamson <[email protected]>
Date: Sun Jun 1 16:02:24 2014 -0600
Make sure locale set right for radix parsing
I haven't found a test case this fails for in v5.20, but I'm sure there
is one. But two commits from now would fail if this wasn't done.
M numeric.c
commit 05b64ef8f4ced01d08bc7e3275858180a559f7f0
Author: Karl Williamson <[email protected]>
Date: Sun Jun 1 13:42:31 2014 -0600
Avoid locale function overhead
For the LC_NUMERIC locale category, one can swap between setlocale being
to "C" or to the underlying locale. Perl keeps track of the state
using two boolean variables. By testing these before calling the swap
functions, we can skip calling them if the current state is the one we
want to be in, and avoid the function call overhead, as the function
becomes a no-op if the current state is the desired one.
M perl.h
commit 342e570a1e94a719a9c8759537306c3aba439ec8
Author: Karl Williamson <[email protected]>
Date: Thu May 15 21:18:14 2014 -0600
'use locale' no longer ever fails.to compile
Thus we can skip the machinations we used to do to make sure things
compiled.
M ext/Pod-Html/lib/Pod/Html.pm
M ext/XS-APItest/t/handy.t
M ext/re/t/reflags.t
M t/op/quotemeta.t
M t/op/taint.t
M t/re/fold_grind.t
M t/re/pat.t
M t/run/locale.t
M t/uni/fold.t
M t/uni/overload.t
commit 49b9e5c97d65dec47b101b1a2b868f1dbd86d779
Author: Karl Williamson <[email protected]>
Date: Thu May 15 19:29:41 2014 -0600
Set utf8 flag properly in localeconv
Rare, but not unheard of, is for the strings returned by localeconv to
be in UTF-8. This commit looks for and sets the UTF-8 flag if they are.
so encoded.
A private function had to changed from static for this. It is renamed
to begin with an underscore to emphasize its private nature.
M embed.fnc
M embed.h
M ext/POSIX/POSIX.xs
M locale.c
M pod/perldelta.pod
M proto.h
M t/run/locale.t
commit a9bbf8eaf23632dcb4652ee694b66925958ab9ab
Author: Karl Williamson <[email protected]>
Date: Thu May 15 18:30:37 2014 -0600
Exclude undefined hash elements from localeconv()
A given platform may not have all the localeconv elements available, or
Perl may be compiled to not use them. Don't define hash elements for
the missing ones.
M ext/POSIX/POSIX.xs
M pod/perldelta.pod
M pod/perllocale.pod
commit 4bb213ec3fce950350464e9efe11ac2e742c525f
Author: Karl Williamson <[email protected]>
Date: Thu May 15 18:13:08 2014 -0600
Swap #if sense for localeconv()
When the else clause is trivial, and the if clause is long, It's far easier
to understand if they're swapped
so the short clause and the else are right after the if.
M ext/POSIX/POSIX.xs
commit 8e2143cd5755315df2afb65e32b4de773697b8b3
Author: Karl Williamson <[email protected]>
Date: Thu May 15 15:40:51 2014 -0600
Localeconv() should be independent of 'use locale'
localeconv() should return the values for the underlying locale of
the program regardless of whether the calling place is within the
scope of "use locale" or not. Otherwise, it makes no sense to call it
from outside such scope, and a pure perl module that calls it on behalf
of a caller would likely get it wrong.
M ext/POSIX/POSIX.xs
M ext/POSIX/lib/POSIX.pm
M ext/POSIX/lib/POSIX.pod
M pod/perldelta.pod
M pod/perllocale.pod
M t/run/locale.t
-----------------------------------------------------------------------
--
Perl5 Master Repository