diff options
author | Zefram <zefram@fysh.org> | 2010-12-12 20:09:00 +0000 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-07-12 21:46:51 -0700 |
commit | c12735bbf21c427d9828557cda9e0c2ea60962c0 (patch) | |
tree | d433838bf5695b6d3b98bcb4f07885957106da28 /ext/XS-APItest/APItest.xs | |
parent | cc76b5cc1552a60539ae1e99cc0b9817087d4bc4 (diff) | |
download | perl-c12735bbf21c427d9828557cda9e0c2ea60962c0.tar.gz |
API test for find_rundefsv()
Diffstat (limited to 'ext/XS-APItest/APItest.xs')
-rw-r--r-- | ext/XS-APItest/APItest.xs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/XS-APItest/APItest.xs b/ext/XS-APItest/APItest.xs index 0b3a6cba3d..d3d7274fca 100644 --- a/ext/XS-APItest/APItest.xs +++ b/ext/XS-APItest/APItest.xs @@ -2861,6 +2861,20 @@ CODE: OUTPUT: RETVAL +STRLEN +underscore_length() +PROTOTYPE: +PREINIT: + SV *u; + U8 *pv; + STRLEN bytelen; +CODE: + u = find_rundefsv(); + pv = (U8*)SvPV(u, bytelen); + RETVAL = SvUTF8(u) ? utf8_length(pv, pv+bytelen) : bytelen; +OUTPUT: + RETVAL + MODULE = XS::APItest PACKAGE = XS::APItest::Magic PROTOTYPES: DISABLE |