From: Nick Ing-Simmons Date: Sat, 15 Feb 2003 12:05:01 +0000 (+0000) Subject: Integrate mainline (storable is dead) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=37f170ad633857baa5daf57832f6548c9e0073ba;p=p5sagit%2Fp5-mst-13.2.git Integrate mainline (storable is dead) p4raw-id: //depot/perlio@18713 --- 37f170ad633857baa5daf57832f6548c9e0073ba diff --cc ext/Encode/Encode.xs index e34d961,0462a5d..0a7c495 --- a/ext/Encode/Encode.xs +++ b/ext/Encode/Encode.xs @@@ -381,10 -395,37 +395,37 @@@ CODE } void + Method_cat_decode(obj, dst, src, off, term, check = 0) + SV * obj + SV * dst + SV * src + SV * off + SV * term + int check + CODE: + { + encode_t *enc = INT2PTR(encode_t *, SvIV(SvRV(obj))); + STRLEN offset = (STRLEN)SvIV(off); + int code = 0; + if (SvUTF8(src)) { + sv_utf8_downgrade(src, FALSE); + } + sv_catsv(dst, encode_method(aTHX_ enc, enc->t_utf8, src, check, + &offset, term, &code)); + SvIVX(off) = (IV)offset; + if (code == ENCODE_FOUND_TERM) { + ST(0) = &PL_sv_yes; + }else{ + ST(0) = &PL_sv_no; + } + XSRETURN(1); + } + + void Method_decode(obj,src,check = 0) -SV * obj -SV * src -int check +SV * obj +SV * src +int check CODE: { encode_t *enc = INT2PTR(encode_t *, SvIV(SvRV(obj))); @@@ -689,3 -732,3 +732,4 @@@ BOOT #include "def_t.h" #include "def_t.exh" } ++