Instead of using SVs, use the underlying C type, and so the code here
doesn't have to deal with the SV conversions
AV *
test_utf8n_to_uvchr_error(s, len, flags)
- SV *s
- SV *len
- SV *flags
+ char *s
+ STRLEN len
+ U32 flags
PREINIT:
STRLEN retlen;
UV ret;
- STRLEN slen;
U32 errors;
CODE:
RETVAL = newAV();
sv_2mortal((SV*)RETVAL);
- ret = utf8n_to_uvchr_error((U8*) SvPV(s, slen),
- SvUV(len),
+ ret = utf8n_to_uvchr_error((U8*) s,
+ len,
&retlen,
- SvUV(flags),
+ flags,
&errors);
/* Returns the return value in [0]; <retlen> in [1], <errors> in [2] */