| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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);
|
|
|
|
| |
This is exported so that attributes.xs can use it.
|
|
|
|
|
| |
Some tests in t/uni/bless.t are TODO, as ref() isn't
clean yet.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
As with the previous commit, no Perl-level visible changes.
|
|
|
|
|
|
|
| |
Since gv_fetchmeth_pvn is primarily used from within gv.c,
and not much of anything is passing in the flag yet, this has
no visible changes on the Perl level; So tests remain
entirely in XS::APItest for the time being.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This also uncomments the UTF-8 tests in XS::APItest.
|
| |
|
|
|
|
|
|
|
| |
Basically t/op/gv.t with UTF-8 names. A vast majority of
the tests currently fail and are marked as TODO; Minus for
failures related to prototypes, these will start working
in the following commits.
|
|
|
|
|
|
|
|
| |
newXS was merged into newXS_flags; added a line in the docs
recommeding using that instead.
newCONSTSUB got a _flags version, which generates the CV in
the right glob if passed the UTF-8 flag.
|
|
|
|
|
|
|
|
| |
This means that
is($t = sub { *\x{30cb} }->(), "*main::\x{30cb}");
won't fail, as $t will get the right glob.
(Though possibly not the right stash, if that also has
UTF-8 in it. That will be done later.)
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Since multi is a boolean (even though it’s typed as an int), there is
no need to have a separate parameter. We can just use a flag bit.
|
|
|
|
|
|
|
|
|
| |
Now that a glob can be initialized and fetched in UTF-8,
the next commit will introduce some changes in toke.c to
actually test this.
Committer’s note: To keep tests passing I had to incorporate
the toke.c:S_pending_ident changes in the same patch.
|
|
|
|
|
|
| |
The downgrade bug that constant.pm has to imitate is about to be fixed
in the next commit. The bug workaround is itself a bug if the bug it
is trying to work around is not present.
|
|
|
|
|
|
|
|
|
| |
Doing memEQ(str1, str2, len2) without checking the length
first will cause memEQ("forth","fort"...) to compare equal and
memEQ("fort","forth"...) to read unallocated memory.
This was only a potential future problem, as none of the callers reach
this branch.
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a new static function to hv.c, hek_eq_pvn_flags,
which replaces several memEQs.
It also cleans up hv_name_set and has the relevant calls
to hv_common and friends made UTF-8 aware.
Finally, it changes share_hek() to modify the hash passed
in if the pv was modified when downgrading.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
passed the UTF8 flag.
newCONSTSUB is still unclean however, so constant subs are
still generated under a wrong name.
gv_fullname4 is also UTF-8 aware now; While that should've gotten
it's own commit and tests, it's not possible to test the
UTF-8 part without the gv_init changes, and it's not possible
to test the gv_init changes without gv_fullname4.
Chicken and egg, as it were. So let's compromise and
wait for the relevant tests once globs can be intiialized as
UTF-8 from the Perl level without XS magic.
|
|
|
|
|
|
|
|
|
| |
This turns on the GV's UTF8 flag in sv.c when the GV is stringified.
This works the same way overloading and references work, in that the
SvUTF8 flag is only valid immediately after SvPV.
For Nick's much more detailed explanation, see
http://www.nntp.perl.org/group/perl.perl5.porters/2011/07/msg174703.html
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
method is a boolean flag (typed I32, but used as a boolean) added by
commit 54310121b442.
These new gv_autoload_* functions have a flags parameter, so there’s
no reason for this extra effective bool. We can just use a flag bit.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The 4 was added in commit 54310121b442 (inseparable changes during
5.003/4 developement), presumably the ‘Don't look up &AUTOLOAD in @ISA
when calling plain function’ part.
Before that, gv_autoload had three arguments, so the 4 indicated the
new version (with the method argument).
Since these new functions don’t all have four arguments, and since
they have a new naming convention, there is not reason for the 4.
|
|
|
|
|
| |
Even if it’s not documented (which I hope to rectify), it should
still continue to be listed in perlapi.
|
| |
|
| |
|
|
|
|
|
|
| |
In addition from taking a flags parameter, it also takes the
length of the method; This will eventually make method
lookup nul-clean.
|
|
|
|
| |
It was not doing the sanity check for all three functions.
|
| |
|
| |
|