This is a live mirror of the Perl 5 development currently hosted at
11 years agoRewrite sv_catsv to pass SV_CAT* flags to sv_catpvn
Father Chrysostomos [Sat, 8 Oct 2011 13:09:38 +0000 (06:09 -0700)]
Rewrite sv_catsv to pass SV_CAT* flags to sv_catpvn

(Both functions actually end with _flags, but I’m trying to keep the
first line short.)

Now that sv_catpvn_flags has this functionality (as of c682ebef86),
sv_catsv can use it, which avoids creating an extra SV for the
utf8+bytes case and removes some duplicate logic.

Also, one code path in sv_utf8_upgrade_flags_grow was ignore the
_grow, causing crashes after the sv_catsv change, so this patch fixes
that, too.

Also, sv_catpvn_flags was not allocating a byte for the trailing
nul, which was entirely my fault (c682ebef86).  So that is hereby
fixed as well.

11 years agomro.c:S_gather_and_rename: Avoid extra SVs
Father Chrysostomos [Sat, 8 Oct 2011 13:38:29 +0000 (06:38 -0700)]
mro.c:S_gather_and_rename: Avoid extra SVs

11 years agoDont’t crash when warning about XSUB redefinition
Father Chrysostomos [Sat, 8 Oct 2011 20:02:46 +0000 (13:02 -0700)]
Dont’t crash when warning about XSUB redefinition

If the stash in question has no name, the attempt to generate the
warning will cause a crash.

Simply skipping the warning is this case is fine, as this is will into
‘undefined’ territory (but it still shouldn’t crash).

11 years agoperldelta: Document fix for not matching non-Unicode \p{}
Karl Williamson [Sat, 8 Oct 2011 15:49:43 +0000 (09:49 -0600)]
perldelta: Document fix for not matching non-Unicode \p{}

This documentes commit 0bda3001dd6310abfca950134ed78f6192d3d8a7

11 years agoTweak the documentation for
Nicholas Clark [Sat, 8 Oct 2011 08:05:57 +0000 (10:05 +0200)]
Tweak the documentation for

Use F<> consistently when describing files. Remove --target=perl from an
example in the synopsis.

11 years agoUse full sym name in isIDFIRST_utf8 to fix [perl #100930]
Father Chrysostomos [Sat, 8 Oct 2011 01:03:20 +0000 (18:03 -0700)]
Use full sym name in isIDFIRST_utf8 to fix [perl #100930]

_is_utf8__perl_idstart is not an API function, so the short
_is_utf8__perl_idstart form cannot be used in public macros.
The long form (Perl__is_utf8__perl_idstart) must be used.

11 years disables building DB_File if it can't patch the XS code.
Nicholas Clark [Fri, 7 Oct 2011 22:51:49 +0000 (00:51 +0200)] disables building DB_File if it can't patch the XS code.

Automatically disable the build of DB_File for commits earlier than
ccb44e3bf3be2c30, as it's not practical to patch DB_File 1.70 and earlier
to build with current Berkeley DB headers.

This can be overridden with -Unoextensions

This should now permit building to 'test_prep' on systems with Berkeley DB
installed, for 5.005_62 and earlier.

11 years now emulates -Dnoextensions if Configure doesn't provide it.
Nicholas Clark [Fri, 7 Oct 2011 22:17:36 +0000 (00:17 +0200)] now emulates -Dnoextensions if Configure doesn't provide it.

11 years agoDon’t put malformed UTF8 in $AUTOLOAD
Father Chrysostomos [Fri, 7 Oct 2011 20:44:37 +0000 (13:44 -0700)]
Don’t put malformed UTF8 in $AUTOLOAD

11 years agoRemoving modules should include updating references
Father Chrysostomos [Fri, 7 Oct 2011 20:29:32 +0000 (13:29 -0700)]
Removing modules should include updating references

11 years needs to set @paths correctly on 32 bit Linux
Nicholas Clark [Fri, 7 Oct 2011 21:07:50 +0000 (23:07 +0200)] needs to set @paths correctly on 32 bit Linux

Without this, Configure may fail prior to commit 1cfa4ec74d4933da (which
added the 'ignore_versioned_solibs' logic), because's code
to set libs relies on successfully finding at least one library to pass to
./Configure with -Dlibs=

miniperl and perl should now build back to perl-5.000 on 32 bit Linux.
test_prep may not work, as early versions of DB_File.xs will fail if a
new db.h is found.

11 years should add db4 compatibility to DB_File.xs where possible.
Nicholas Clark [Fri, 7 Oct 2011 20:23:57 +0000 (22:23 +0200)] should add db4 compatibility to DB_File.xs where possible.

Without this it won't build if db.h is found, but it's "too new" for the
checked-out vintage XS code.

Tweak apply_patch() to print out any patch that fails to apply. This helps
with debugging patches generated dynamically by

11 years must build before Unicode::Normalize.
Nicholas Clark [Fri, 7 Oct 2011 19:08:57 +0000 (21:08 +0200)] must build before Unicode::Normalize.

The Makefile.PL for Unicode::Normalize needs lib/unicore/
Even without a parallel build, we need a dependency to ensure that it builds
first. This problem was solved in blead with commit 9f3ef600c170f61e.

11 years agorenumber SVpad_STATE and free a bit in SvFLAGS
David Mitchell [Fri, 7 Oct 2011 19:01:08 +0000 (20:01 +0100)]
renumber SVpad_STATE and free a bit in SvFLAGS

SVpad_STATE is only used on SVs which hold PAD names; make it share the
same flags bit as SVprv_WEAKREF/SVf_IVisUV. Together with the previous
commit, this frees up a single bit in SvFLAGS, 0x00010000.

11 years agomake SVs_PADTMP and SVs_PADSTALE share a bit
David Mitchell [Fri, 7 Oct 2011 14:38:56 +0000 (15:38 +0100)]
make SVs_PADTMP and SVs_PADSTALE share a bit

SVs_PADSTALE is only meaningful with SVs_PADMY, while
SVs_PADTMP is only meaningful with !SVs_PADMY,
so let them share the same flag bit.

Note that this doesn't yet free a bit in SvFLAGS, as the two
bits are also used for SVpad_STATE, SVpad_TYPED.

(This is is follow-on to 62bb6514085e5eddc42b4fdaf3713ccdb7f1da85.)

11 years agoUse HEKf
Father Chrysostomos [Fri, 7 Oct 2011 18:39:50 +0000 (11:39 -0700)]
Use HEKf

This avoids creating a lot of temporary SVs.

11 years agoHEKf256 format
Father Chrysostomos [Fri, 7 Oct 2011 17:00:24 +0000 (10:00 -0700)]
HEKf256 format

11 years agoTeach porting/diag.t about HEKf
Father Chrysostomos [Fri, 7 Oct 2011 16:49:13 +0000 (09:49 -0700)]
Teach porting/diag.t about HEKf

11 years agoHEKf format
Father Chrysostomos [Fri, 7 Oct 2011 16:47:51 +0000 (09:47 -0700)]
HEKf format

11 years agoIn, "patch" ext/IPC/SysV/SysV.xs to the current SHMLBA code.
Nicholas Clark [Fri, 7 Oct 2011 13:33:31 +0000 (15:33 +0200)]
In, "patch" ext/IPC/SysV/SysV.xs to the current SHMLBA code.

For some historical revisions, it's not good enough simply taking out the
first #include <asm/page.h>, because other code changes in that area can
break the build. Instead, replace any old version of that #ifdef forest with
the current code. Additionally, do this editing unconditionally, even if the
target is "miniperl". Skipping it on target "miniperl" causes surprises if
one is trying to debug the build by getting to build to
miniperl (or skip), and then using make lib/auto/IPC/SysV/
as the test case.

This adds an edit_file() function. Move apply_patch() next to it, to group
related functions together.

11 years agouse SSize_t for string offsets instead of int or socklen_t
Tony Cook [Fri, 7 Oct 2011 09:45:05 +0000 (20:45 +1100)]
use SSize_t for string offsets instead of int or socklen_t

Note: while I discovered the incorrect types while investigating [perl
described in that report, so I don't consider this a fix for that bug.

Unfortunately to test this change I'd need a scalar at least 2G in
size, which unreasonable for a test we run on each install.

Tested manually on a machine with plenty of memory:


[tonyc@dromedary perl]$ echo foo | ./perl -le '$x = ""; read(STDIN, $x, 4, 5000000000); print length $x'


[tonyc@dromedary perl]$ echo foo | ./perl -le '$x = ""; read(STDIN, $x, 4, 5000000000); print length $x'

11 years agodocument the behaviour of negative klen for hv_fetch and friends
Tony Cook [Fri, 7 Oct 2011 09:17:02 +0000 (20:17 +1100)]
document the behaviour of negative klen for hv_fetch and friends

This interface is unfortunate, but it's there and in use.

11 years agoperldelta up to c60dbbc38
Father Chrysostomos [Fri, 7 Oct 2011 07:02:04 +0000 (00:02 -0700)]
perldelta up to c60dbbc38

11 years agoSuppress some uninit warnings in gv.c:S_maybe_add_coresub
Father Chrysostomos [Fri, 7 Oct 2011 06:08:13 +0000 (23:08 -0700)]
Suppress some uninit warnings in gv.c:S_maybe_add_coresub

Suprisingly, gcc figured out that these were never used uninitialised
when I had the body of this function as part of gv_fetchpvn_flags, but
now it has trouble recognising that fact.

11 years agoCast to signed before negating, to avoid compiler warnings
Brian Fraser [Fri, 7 Oct 2011 05:17:33 +0000 (22:17 -0700)]
Cast to signed before negating, to avoid compiler warnings

11 years agoClarification in perlre.pod about captures created inside a DEFINE
Brian Fraser [Fri, 7 Oct 2011 03:12:38 +0000 (00:12 -0300)]
Clarification in perlre.pod about captures created inside a DEFINE

11 years agoperldelta up to 59c72abb9
Father Chrysostomos [Fri, 7 Oct 2011 03:22:47 +0000 (20:22 -0700)]
perldelta up to 59c72abb9

11 years agoMake undef %overload:: test more likely to crash
Father Chrysostomos [Fri, 7 Oct 2011 03:19:09 +0000 (20:19 -0700)]
Make undef %overload:: test more likely to crash

I think I omitted the blessing by mistake.  Taken alone, this
block does not crash in earlier versions without the bless.

11 years agoIncrease $DynaLoader'VERSION from 1.13 to 1.14,
Father Chrysostomos [Fri, 7 Oct 2011 01:33:46 +0000 (18:33 -0700)]
Increase $DynaLoader'VERSION from 1.13 to 1.14,

in view of 2e3468793982.

11 years agoRemove "8-bit" reference from ord documentation
John P Linderman [Fri, 7 Oct 2011 02:04:38 +0000 (20:04 -0600)]
Remove "8-bit" reference from ord documentation

for additional background.

11 years agoSet PERL_DL_NONLAZY in t/TEST to check existence of all symbols
Gerard Goossen [Tue, 24 Nov 2009 10:07:52 +0000 (11:07 +0100)]
Set PERL_DL_NONLAZY in t/TEST to check existence of all symbols

11 years agoMerge support for UTF8 symbols
Father Chrysostomos [Thu, 6 Oct 2011 20:02:12 +0000 (13:02 -0700)]
Merge support for UTF8 symbols

This branch makes symbols support UTF8 internally, which means that
Unicode is supported properly at the perl level.  So ${"\xff"} will
give you the same scalar, regardless of the internal encoding of the
string.  Also, many  parts of the core are now nul-clean, too, as a
result of the UTF8 changes, which means that ‘$m = "a\0b"; foo->$m’
will try to call the method named "a\0b", instead of just "a".
Details follow.

• New API functions:
  Many of these take a _flags parameter, which accept the
  SVf_UTF8 flag.
  • gv_init_pv(n)/sv
  • gv_fetchmeth_pv(n)/sv
  • gv_fetchmeth_pv(n)/sv_autoload
  • gv_fetchmethod_pv(n)/sv_flags — may change
  • gv_autoload_pv(n)/sv
  • newGVgen_flags
  • sv_derived_from_pv(n)/sv
  • sv_does_pv(n)/sv
  • whichsig_pv(n)/sv
• New internal functions:
  • CopSTASH_flags
  • CopSTASH_flags_set
  • PmopSTASH_flags
  • PmopSTASH_flags_set
  • sv_sethek
• Parts of Perl that handle Unicode symbol names correctly:
  • Method names (including those passed to ‘use overload’)
  • Typeglob names (including variable and filehandle names)
  • Package names
  • Constant subroutine names (not nul-clean yet)
  • goto
  • Symbolic dereferencing
  • Second argument to bless() and tie()
  • Return value of ref()
  • Package names returned by caller()
  • Subroutine prototypes
  • Attributes
  • Warnings and error messages that mention filehandles, packages,
    methods, variables, constant values, subroutines, symbolic refer-
    ences, format names and subroutine prototypes
• Parts of Perl that now handle embedded nuls correctly:
  • Method names
  • Typeglob names (including filehandle names)
  • Package names
  • Autoloading
  • Return value of ref()
  • Package names returned by caller()
  • Filehandle warnings
  • Typeglob elements (*foo{"THING\0stuff"})
  • Signal names
  • Warnings and error messages that mention (yes, it’s the same list
    as above) filehandles, packages, methods, variables, constant val-
    ues, subroutines, symbolic references, format names and subroutine
• Other bug fixes
  • *{é} now treats é as the name of the glob (the usual implicit
    quoting), instead of treating it as a bareword (strict-unsafe)
    or function call.  *{é} used to be equivalent to *{+é}, in
    other words.
• Modified modules:
  • constant has been modified not to apply the workaround for the bug
    that this branch fixes, if that workaround does not apply.
  • attributes has been modified as part of making Unicode attri-
    butes work.
  • XS::APItest
  • mro, as part of making method lookup account for Unicode.
• Side effects
  • Blessing into "\0" no longer causes ref() to return false.
  • *{"*é::..."} is now equivalent to *{"é::..."}, just as
    *{"*e::..."} is equivalent to *{"e::..."}.  Previously, the * was
    only stripped if followed by [A-Za-z].
  • $é is now subject to ‘Used only once’ warnings.  It used to be
    exempt, as the code that checked the named considered it a punctu-
    ation variable.

11 years agoCorrect skip counts for miniperl
Father Chrysostomos [Thu, 6 Oct 2011 15:46:35 +0000 (08:46 -0700)]
Correct skip counts for miniperl

11 years agoIncrease $mro::VERSION from 1.08 to 1.09
Father Chrysostomos [Thu, 6 Oct 2011 07:10:06 +0000 (00:10 -0700)]
Increase $mro::VERSION from 1.08 to 1.09

11 years agoIncrease $attributes::VERSION from 0.16 to 0.17
Father Chrysostomos [Thu, 6 Oct 2011 07:09:30 +0000 (00:09 -0700)]
Increase $attributes::VERSION from 0.16 to 0.17

11 years agoIncrease $XS::APItest::VERSION from 0.31 to 0.32
Father Chrysostomos [Thu, 6 Oct 2011 07:08:59 +0000 (00:08 -0700)]
Increase $XS::APItest::VERSION from 0.31 to 0.32

11 years agoIncrease $constant::VERSION from 1.22 to 1.23
Father Chrysostomos [Thu, 6 Oct 2011 07:08:28 +0000 (00:08 -0700)]
Increase $constant::VERSION from 1.22 to 1.23

11 years agouni/universal.t tests passing
Father Chrysostomos [Thu, 6 Oct 2011 06:32:16 +0000 (23:32 -0700)]
uni/universal.t tests passing

11 years agoRewrite -l warning test to account for 433644eed
Father Chrysostomos [Thu, 6 Oct 2011 06:31:52 +0000 (23:31 -0700)]
Rewrite -l warning test to account for 433644eed

11 years agoRestore whichsig to the list in perlapi
Father Chrysostomos [Thu, 6 Oct 2011 05:26:00 +0000 (22:26 -0700)]
Restore whichsig to the list in perlapi

11 years agowhichsig nul-cleanup.
Brian Fraser [Fri, 30 Sep 2011 20:48:58 +0000 (13:48 -0700)]
whichsig nul-cleanup.

This adds _pv, _pvn, and _pv versions of whichsig() in mg.c, which
get both kill "NAME" and %SIG lookup nul-clean.

11 years agotoke.c, ext/attributes/attributes.xs: Make attributes UTF-8 clean.
Brian Fraser [Fri, 22 Jul 2011 17:16:42 +0000 (18:16 +0100)]
toke.c, ext/attributes/attributes.xs: Make attributes UTF-8 clean.

11 years agoop.c: Scalar filehandles in errors UTF8 cleanup.
Brian Fraser [Fri, 30 Sep 2011 20:26:26 +0000 (13:26 -0700)]
op.c: Scalar filehandles in errors UTF8 cleanup.

11 years agoModify S_pending_ident to use sv_catpvn_flags
Father Chrysostomos [Fri, 30 Sep 2011 19:15:09 +0000 (12:15 -0700)]
Modify S_pending_ident to use sv_catpvn_flags

with the new SV_CAT* constants, since that’s faster than creating an
SV to pass to sv_catsv.

11 years agoTODO tests for parsing our() now pass
Brian Fraser [Thu, 6 Oct 2011 05:16:32 +0000 (22:16 -0700)]
TODO tests for parsing our() now pass

11 years agoOust cv_ckproto_len
Father Chrysostomos [Fri, 30 Sep 2011 19:10:51 +0000 (12:10 -0700)]
Oust cv_ckproto_len

It is no longer used in core (having been superseded by
cv_ckproto_len_flags), is unused on CPAN, and is not part of the API.

The cv_ckproto ‘public’ macro is modified to use the _flags version.
I put ‘public’ in quotes because, even before this commit, cv_ckproto
was using a non-exported function, and hence could never have worked
on a strict linker (or whatever you call it).

11 years agotoke.c, op.c, sv.c: Prototype parsing and checking are nul-and-UTF8 clean.
Brian Fraser [Fri, 30 Sep 2011 13:25:45 +0000 (06:25 -0700)]
toke.c, op.c, sv.c: Prototype parsing and checking are nul-and-UTF8 clean.

This means that eval "sub foo ($;\0whoops) { say @_  }" will correctly
include \0whoops in the CV's prototype (while complaining about illegal
characters), and that

use utf8;
BEGIN { $::{"foo"} = "\$\0L\351on" }
BEGIN { eval "sub foo (\$\0L\x{c3}\x{a9}on) {};"; }

will not warn about a mismatched prototype.

11 years agogv.c, op.c, pp.c: Stash-injected prototypes and prototype() are UTF-8 clean.
Brian Fraser [Mon, 11 Jul 2011 17:50:10 +0000 (18:50 +0100)]
gv.c, op.c, pp.c: Stash-injected prototypes and prototype() are UTF-8 clean.

This makes perl -E '$::{example} = "\x{30cb}"; say prototype example;'
store and fetch the correctly flagged prototype.

With this, all TODO tests in gv.t pass; The next commit will deal
with making the parsing of prototypes nul-clean.

11 years agopp.c: Got pp_gelem nul-clean.
Brian Fraser [Mon, 11 Jul 2011 17:17:32 +0000 (18:17 +0100)]
pp.c: Got pp_gelem nul-clean.

11 years agotoke.c: Some simple mending to get readline() working with UTF-8 filehandles
Brian Fraser [Sun, 10 Jul 2011 11:20:26 +0000 (08:20 -0300)]
toke.c: Some simple mending to get readline() working with UTF-8 filehandles

11 years agopp_sys.c: pp_select UTF8 cleanup.
Brian Fraser [Sun, 10 Jul 2011 11:18:57 +0000 (08:18 -0300)]
pp_sys.c: pp_select UTF8 cleanup.

11 years agoop.c: Malformed prototype warning on UTF8 sub name
Brian Fraser [Thu, 7 Jul 2011 12:25:18 +0000 (09:25 -0300)]
op.c: Malformed prototype warning on UTF8 sub name

11 years agogv.c: Use name_end to avoid compiler warning
Father Chrysostomos [Thu, 6 Oct 2011 05:13:35 +0000 (22:13 -0700)]
gv.c: Use name_end to avoid compiler warning

In this code path, name_cursor could be uninitialised if
gv_fetchpvn_flags is called with GV_NOTQUAL|GV_ADDWARN.  Whenever it
is initialised, it is the same as name_end by the time this part
of the function is reached.

11 years agoglobvar.t: Skip PL_warn_uninit_sv
Father Chrysostomos [Thu, 6 Oct 2011 05:07:07 +0000 (22:07 -0700)]
globvar.t: Skip PL_warn_uninit_sv

Until someone can explain to me why these sorts of things are exported,
I’ll skipping the test.  Nothing is failing for me (yet), and it is
not clear that we want to support this name for ever.

11 years agoFix diag.t failure with diag_listed_as comment
Father Chrysostomos [Thu, 6 Oct 2011 04:45:05 +0000 (21:45 -0700)]
Fix diag.t failure with diag_listed_as comment

11 years agoSeveral TODO tests that now pass.
Brian Fraser [Thu, 6 Oct 2011 03:45:21 +0000 (20:45 -0700)]
Several TODO tests that now pass.

11 years agoutil.c UTF8 cleanup
Brian Fraser [Thu, 7 Jul 2011 09:09:12 +0000 (06:09 -0300)]
util.c UTF8 cleanup

11 years agoMore warnings tests.
Brian Fraser [Thu, 7 Jul 2011 09:01:33 +0000 (06:01 -0300)]
More warnings tests.

11 years agouniversal.c: VERSION UTF8 cleanup
Brian Fraser [Thu, 7 Jul 2011 08:57:57 +0000 (05:57 -0300)]
universal.c: VERSION UTF8 cleanup

11 years agouniversal.c: Make croak_xs_usage account for UTF8
Brian Fraser [Thu, 7 Jul 2011 08:43:43 +0000 (05:43 -0300)]
universal.c: Make croak_xs_usage account for UTF8

11 years ago"Use of uninitialized value..." UTF8 cleanup
Brian Fraser [Thu, 7 Jul 2011 08:36:34 +0000 (05:36 -0300)]
"Use of uninitialized value..." UTF8 cleanup

11 years agogv.c: Make more warnings utf8-clean
Brian Fraser [Thu, 6 Oct 2011 03:42:53 +0000 (20:42 -0700)]
gv.c: Make more warnings utf8-clean

11 years agomro.(c|xs): Make warnings utf8-clean
Brian Fraser [Thu, 7 Jul 2011 07:35:35 +0000 (04:35 -0300)]
mro.(c|xs): Make warnings utf8-clean

11 years agot/uni/gv.t, stringify is clean, remove the TODO
Brian Fraser [Fri, 22 Jul 2011 13:05:11 +0000 (10:05 -0300)]
t/uni/gv.t, stringify is clean, remove the TODO

11 years agoTests for DATA handle in UTF8 packages
Brian Fraser [Fri, 30 Sep 2011 01:27:10 +0000 (18:27 -0700)]
Tests for DATA handle in UTF8 packages

11 years agotoke.c: Take utf8 into account when creating DATA handle
Father Chrysostomos [Fri, 30 Sep 2011 01:23:27 +0000 (18:23 -0700)]
toke.c: Take utf8 into account when creating DATA handle

This is based on work from Brian Fraser, but differs from his original
in that it does not require an intermediate SV.

11 years agoTests for UTF-8 stashes.
Brian Fraser [Fri, 22 Jul 2011 13:10:48 +0000 (10:10 -0300)]
Tests for UTF-8 stashes.

11 years agoTests for package; declarations in UTF-8
Brian Fraser [Fri, 22 Jul 2011 13:10:34 +0000 (10:10 -0300)]
Tests for package; declarations in UTF-8

11 years agoMore tests for t/uni/method.t
Brian Fraser [Fri, 22 Jul 2011 13:10:57 +0000 (10:10 -0300)]
More tests for t/uni/method.t

11 years agosv.c: Make most warnings utf8-clean
Brian Fraser [Thu, 6 Oct 2011 00:57:20 +0000 (17:57 -0700)]
sv.c: Make most warnings utf8-clean

11 years agosv.c: Make cloning account for UTF8 stash names
Brian Fraser [Thu, 29 Sep 2011 21:46:35 +0000 (14:46 -0700)]
sv.c: Make cloning account for UTF8 stash names

11 years agoMake sv.c:sv_clear account for UTF8 keys in PL_stashcache
Brian Fraser [Thu, 29 Sep 2011 21:44:55 +0000 (14:44 -0700)]
Make sv.c:sv_clear account for UTF8 keys in PL_stashcache

11 years agosv.c: Pass in UNI_DISPLAY_ISPRINT in S_not_a_number
Brian Fraser [Wed, 6 Jul 2011 17:44:11 +0000 (14:44 -0300)]
sv.c: Pass in UNI_DISPLAY_ISPRINT in S_not_a_number

11 years agopp_sys.c: Make warnings utf8-clean
Brian Fraser [Thu, 29 Sep 2011 21:39:35 +0000 (14:39 -0700)]
pp_sys.c: Make warnings utf8-clean

11 years agopp_hot.c: Make warnings utf8-clean
Brian Fraser [Wed, 6 Jul 2011 16:45:07 +0000 (13:45 -0300)]
pp_hot.c: Make warnings utf8-clean

11 years agoTeach porting/diag.t about SVf32 and SVf256
Father Chrysostomos [Wed, 5 Oct 2011 20:33:36 +0000 (13:33 -0700)]
Teach porting/diag.t about SVf32 and SVf256

11 years agopp.c: Make warnings utf8-clean
Brian Fraser [Wed, 6 Jul 2011 16:08:37 +0000 (13:08 -0300)]
pp.c: Make warnings utf8-clean

11 years agoMake op.c warnings UTF8-clean
Brian Fraser [Wed, 6 Jul 2011 15:50:59 +0000 (12:50 -0300)]
Make op.c warnings UTF8-clean

11 years agoMake gv.c and pp_ctl.c warnings utf8-clean
Brian Fraser [Wed, 5 Oct 2011 19:48:07 +0000 (12:48 -0700)]
Make gv.c and pp_ctl.c warnings utf8-clean

11 years agodoio.c: Make warnings UTF8- and nul-clean
Brian Fraser [Wed, 28 Sep 2011 03:33:02 +0000 (20:33 -0700)]
doio.c: Make warnings UTF8- and nul-clean

11 years agoutil.c for threads: stashpv_hvname_match UTF8 cleanup.
Brian Fraser [Sat, 23 Jul 2011 21:48:51 +0000 (18:48 -0300)]
util.c for threads: stashpv_hvname_match UTF8 cleanup.

11 years agoTests for DOES/isa/can with UTF8 and embedded nuls
Brian Fraser [Tue, 4 Oct 2011 21:53:12 +0000 (14:53 -0700)]
Tests for DOES/isa/can with UTF8 and embedded nuls

11 years agoDocument sv_does_pvn
Father Chrysostomos [Thu, 6 Oct 2011 07:02:36 +0000 (00:02 -0700)]
Document sv_does_pvn

11 years agoCorrect name of sv_does_sv apidoc entry
Father Chrysostomos [Fri, 30 Sep 2011 20:44:22 +0000 (13:44 -0700)]
Correct name of sv_does_sv apidoc entry

plus other tweaks

11 years agouniversal.c: sv_does() UTF8 cleanup.
Brian Fraser [Fri, 30 Sep 2011 20:42:31 +0000 (13:42 -0700)]
universal.c: sv_does() UTF8 cleanup.

This adds _sv, _pv, and _pvn forms to sv_does, and changes it to use
sv_ref() instead of sv_reftype().

11 years agomro.c: Correct utf8 and bytes concatenation
Father Chrysostomos [Thu, 29 Sep 2011 15:48:38 +0000 (08:48 -0700)]
mro.c: Correct utf8 and bytes concatenation

The previous commit introduced some code that concatenates a pv on to
an sv and then does SvUTF8_on on the sv if the pv was utf8.

That can’t work if the sv was in Latin-1 (or single-byte) encoding
and contained extra-ASCII characters.  Nor can it work if bytes are
appended to a utf8 sv.  Both produce mangled utf8.

There is apparently no function apart from sv_catsv that handle
this.  So I’ve modified sv_catpvn_flags to handle this if passed the
SV_CATUTF8 (concatenating a utf8 pv) or SV_CATBYTES (cancatenating a
byte pv) flag.

This avoids the overhead of creating a new sv (in fact, sv_catsv
even copies its rhs in some cases, so that would mean creating two
new svs).  It might even be worthwhile to redefine sv_catsv in terms
of this....

11 years agomro UTF8 cleanup.
Brian Fraser [Wed, 6 Jul 2011 13:41:10 +0000 (10:41 -0300)]
mro UTF8 cleanup.

This patch also duplicates existing mro tests with copies that use
Unicode in identifiers, to test the mro code.

Since those tests trigger it, it also fixes a bug in the parsing
of *{...}: If the first character inside the braces is a non-ASCII
Unicode identifier character, the inside is now implicitly quoted
if it is just an identifier (just as it is with ASCII identifiers),
instead of being parsed as a bareword that would violate strict subs.

11 years agouniversal.c: ->can UTF8 cleanup.
Brian Fraser [Wed, 6 Jul 2011 11:54:11 +0000 (08:54 -0300)]
universal.c: ->can UTF8 cleanup.

11 years agouniversal.c: ->isa, sv_derived_from UTF8 cleanup.
Brian Fraser [Tue, 27 Sep 2011 00:35:50 +0000 (17:35 -0700)]
universal.c: ->isa, sv_derived_from UTF8 cleanup.

This makes them both nul-and-UTF8 clean, although the latter
is somewhat superficial, as mro isn't clean yet.

(Tests coming once ->can and ->DOES are clean)

11 years agopp_sys.c: pp_tie and untie UTF8 cleanup.
Brian Fraser [Wed, 6 Jul 2011 10:57:20 +0000 (07:57 -0300)]
pp_sys.c: pp_tie and untie UTF8 cleanup.

11 years agopp.c: pp_substr for UTF-8 globs.
Brian Fraser [Tue, 27 Sep 2011 00:24:44 +0000 (17:24 -0700)]
pp.c: pp_substr for UTF-8 globs.

Since typeglobs may have the UTF8 flag set now, we need to avoid
testing SvCUR on a potential glob, as that would trip an assertion.

11 years agopp_ctl.c: pp_caller UTF8 cleanup.
Brian Fraser [Mon, 26 Sep 2011 22:32:45 +0000 (15:32 -0700)]
pp_ctl.c: pp_caller UTF8 cleanup.

11 years agosv.c: S_anonymise_cv_maybe UTF8 cleanup.
Brian Fraser [Mon, 26 Sep 2011 20:48:52 +0000 (13:48 -0700)]
sv.c: S_anonymise_cv_maybe UTF8 cleanup.

11 years agopp.c & sv.c: pp_ref UTF8 and null cleanup.
Brian Fraser [Mon, 26 Sep 2011 19:56:47 +0000 (12:56 -0700)]
pp.c & sv.c: pp_ref UTF8 and null cleanup.

This adds a new function to sv.c, sv_ref, which is a nul-and-UTF8
clean version of sv_reftype. pp_ref now uses that.

sv_ref() not only returns the SV, but also takes in an SV
to modify, so we can say both sv_ref(TARG, obj, TRUE); and
sv = sv_ref(NULL, obj, TRUE);

11 years agoAdd a sv_sethek() function to sv.c
Brian Fraser [Thu, 6 Oct 2011 06:56:03 +0000 (23:56 -0700)]
Add a sv_sethek() function to sv.c

This is exported so that attributes.xs can use it.

11 years agopp.c: pp_bless UTF8 cleanup.
Brian Fraser [Wed, 6 Jul 2011 09:16:30 +0000 (06:16 -0300)]
pp.c: pp_bless UTF8 cleanup.

Some tests in t/uni/bless.t are TODO, as ref() isn't
clean yet.

11 years agoop.c: Flag named methods if they are in UTF-8.
Brian Fraser [Mon, 26 Sep 2011 16:21:23 +0000 (09:21 -0700)]
op.c: Flag named methods if they are in UTF-8.

11 years agopp_hot.c: method_common is UTF-8 aware.
Brian Fraser [Mon, 26 Sep 2011 15:27:59 +0000 (08:27 -0700)]
pp_hot.c: method_common is UTF-8 aware.

Not really useful yet, since named methods aren't correctly
flagged; that is to access a \x{30cb} method, you'd need
to do something like Obj->${\"\x{30cb}"}.

Committer’s note: I’m also including one piece of the ‘gv.c and
pp_ctl.c warnings’ patch so that the newly-added tests in this
commit pass.

11 years agogv.c: gv_fetchmethod_(flags|autoload) UTF8 cleanup.
Brian Fraser [Tue, 4 Oct 2011 01:16:03 +0000 (18:16 -0700)]
gv.c: gv_fetchmethod_(flags|autoload) UTF8 cleanup.

11 years agogv.c: S_gv_get_super_pkg UTF8 cleanup.
Brian Fraser [Mon, 26 Sep 2011 05:32:52 +0000 (22:32 -0700)]
gv.c: S_gv_get_super_pkg UTF8 cleanup.