Integrate mainline (storable is dead)
Nick Ing-Simmons [Sat, 15 Feb 2003 12:05:01 +0000 (12:05 +0000)]
p4raw-id: //depot/perlio@18713

1  2 
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"
  }
++