diff options
author | Brian Fraser <fraserbn@gmail.com> | 2011-07-05 02:14:59 -0300 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-10-06 13:00:57 -0700 |
commit | e69194836739c81076634d7782cecab9026c4aca (patch) | |
tree | b4378fe58f152e7ad4a453276726c7944a12d3e5 /ext/XS-APItest/APItest.xs | |
parent | e11040622d31e730b81d6165586b3dfe4b4bf08f (diff) | |
download | perl-e69194836739c81076634d7782cecab9026c4aca.tar.gz |
gv.c: Added gv_fetchmeth_(sv|pv|pvn).
I'm probably pushing this too early. Can't do the
Perl-level tests because of that. TODO.
Diffstat (limited to 'ext/XS-APItest/APItest.xs')
-rw-r--r-- | ext/XS-APItest/APItest.xs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/ext/XS-APItest/APItest.xs b/ext/XS-APItest/APItest.xs index d555931c49..56c9dd92d5 100644 --- a/ext/XS-APItest/APItest.xs +++ b/ext/XS-APItest/APItest.xs @@ -1869,6 +1869,34 @@ gv_init_type(namesv, multi, flags, type) XPUSHs( gv ? (SV*)gv : &PL_sv_undef); void +gv_fetchmeth_type(stash, methname, type, level, flags) + HV* stash + SV* methname + int type + I32 level + I32 flags + PREINIT: + STRLEN len; + const char * const name = SvPV_const(methname, len); + GV* gv; + PPCODE: + switch (type) { + case 0: + gv = gv_fetchmeth(stash, name, len, level); + break; + case 1: + gv = gv_fetchmeth_sv(stash, methname, level, flags); + break; + case 2: + gv = gv_fetchmeth_pv(stash, name, level, flags | SvUTF8(methname)); + break; + case 3: + gv = gv_fetchmeth_pvn(stash, name, len, level, flags | SvUTF8(methname)); + break; + } + XPUSHs( gv ? MUTABLE_SV(gv) : &PL_sv_undef ); + +void eval_sv(sv, flags) SV* sv I32 flags |