Submit an old integrate
Nick Ing-Simmons [Wed, 24 Apr 2002 15:50:31 +0000 (15:50 +0000)]
p4raw-id: //depot/perlio@16131

1  2 
ext/Encode/Encode.xs

@@@ -263,6 -265,33 +265,33 @@@ CODE
      XSRETURN(1);
  }
  
+ void
+ Method_needs_lines(obj)
+ SV *  obj
+ CODE:
+ {
+     encode_t *enc = INT2PTR(encode_t *, SvIV(SvRV(obj)));
+     ST(0) = &PL_sv_no;
+     XSRETURN(1);
+ }
+ void
+ Method_perlio_ok(obj)
+ SV *  obj
+ CODE:
+ {
+     encode_t *enc = INT2PTR(encode_t *, SvIV(SvRV(obj)));
+     require_pv(PERLIO_FILENAME);
 -    if (hv_exists(get_hv("INC", 0), 
++    if (hv_exists(get_hv("INC", 0),
+                 PERLIO_FILENAME, strlen(PERLIO_FILENAME)))
+     {
+       ST(0) = &PL_sv_yes;
+     }else{
+       ST(0) = &PL_sv_no;
+     }
+     XSRETURN(1);
+ }
  MODULE = Encode         PACKAGE = Encode
  
  PROTOTYPES: ENABLE