develooper Front page | perl.perl5.porters | Postings from November 2016

Re: [Encode] 2.87 released!

Thread Previous | Thread Next
From:
Steve Hay via perl5-porters
Date:
November 1, 2016 10:47
Subject:
Re: [Encode] 2.87 released!
Message ID:
CADED=K6ve_DAzRXPX=EsjtUDnZppAaw+BP1Ziw_fU5f32k+Wyg@mail.gmail.com
diff -ruN Encode-2.87.orig/Encode.xs Encode-2.87/Encode.xs
--- Encode-2.87.orig/Encode.xs	2016-10-28 06:03:59.000000000 +0100
+++ Encode-2.87/Encode.xs	2016-11-01 08:56:13.193109400 +0000
@@ -558,6 +558,7 @@
     modify = (check && !(check & ENCODE_LEAVE_SRC));
 CODE:
 {
+    dSP;
     if (!SvOK(src))
         XSRETURN_UNDEF;
     s = modify ? SvPV_force_nomg(src, slen) : SvPV_nomg(src, slen);
@@ -568,7 +569,6 @@
     /* 
      * PerlIO check -- we assume the object is of PerlIO if renewed
      */
-    dSP;
     ENTER; SAVETMPS;
     PUSHMARK(sp);
     XPUSHs(obj);
@@ -715,18 +715,24 @@
 SV *	off
 SV *	term
 SV *    check_sv
-INIT:
-    SvGETMAGIC(src);
-    SvGETMAGIC(check_sv);
-    int check = SvROK(check_sv) ? ENCODE_PERLQQ|ENCODE_LEAVE_SRC : SvIV_nomg(check_sv);
-    SV *fallback_cb = SvROK(check_sv) ? check_sv : &PL_sv_undef;
-    bool modify = (check && !(check & ENCODE_LEAVE_SRC));
-    encode_t *enc = INT2PTR(encode_t *, SvIV(SvRV(obj)));
-    STRLEN offset = (STRLEN)SvIV(off);
+PREINIT:
+    int check;
+    SV *fallback_cb;
+    bool modify;
+    encode_t *enc;
+    STRLEN offset;
     int code = 0;
     U8 *s;
     STRLEN slen;
     SV *tmp;
+INIT:
+    SvGETMAGIC(src);
+    SvGETMAGIC(check_sv);
+    check = SvROK(check_sv) ? ENCODE_PERLQQ|ENCODE_LEAVE_SRC : SvIV_nomg(check_sv);
+    fallback_cb = SvROK(check_sv) ? check_sv : &PL_sv_undef;
+    modify = (check && !(check & ENCODE_LEAVE_SRC));
+    enc = INT2PTR(encode_t *, SvIV(SvRV(obj)));
+    offset = (STRLEN)SvIV(off);
 CODE:
 {
     if (!SvOK(src))
@@ -752,15 +758,20 @@
 SV *	obj
 SV *	src
 SV *	check_sv
+PREINIT:
+    int check;
+    SV *fallback_cb;
+    bool modify;
+    encode_t *enc;
+    U8 *s;
+    STRLEN slen;
 INIT:
     SvGETMAGIC(src);
     SvGETMAGIC(check_sv);
-    int check = SvROK(check_sv) ? ENCODE_PERLQQ|ENCODE_LEAVE_SRC : SvIV_nomg(check_sv);
-    SV *fallback_cb = SvROK(check_sv) ? check_sv : &PL_sv_undef;
-    bool modify = (check && !(check & ENCODE_LEAVE_SRC));
-    encode_t *enc = INT2PTR(encode_t *, SvIV(SvRV(obj)));
-    U8 *s;
-    STRLEN slen;
+    check = SvROK(check_sv) ? ENCODE_PERLQQ|ENCODE_LEAVE_SRC : SvIV_nomg(check_sv);
+    fallback_cb = SvROK(check_sv) ? check_sv : &PL_sv_undef;
+    modify = (check && !(check & ENCODE_LEAVE_SRC));
+    enc = INT2PTR(encode_t *, SvIV(SvRV(obj)));
 CODE:
 {
     if (!SvOK(src))
@@ -780,15 +791,20 @@
 SV *	obj
 SV *	src
 SV *	check_sv
+PREINIT:
+    int check;
+    SV *fallback_cb;
+    bool modify;
+    encode_t *enc;
+    U8 *s;
+    STRLEN slen;
 INIT:
     SvGETMAGIC(src);
     SvGETMAGIC(check_sv);
-    int check = SvROK(check_sv) ? ENCODE_PERLQQ|ENCODE_LEAVE_SRC : SvIV_nomg(check_sv);
-    SV *fallback_cb = SvROK(check_sv) ? check_sv : &PL_sv_undef;
-    bool modify = (check && !(check & ENCODE_LEAVE_SRC));
-    encode_t *enc = INT2PTR(encode_t *, SvIV(SvRV(obj)));
-    U8 *s;
-    STRLEN slen;
+    check = SvROK(check_sv) ? ENCODE_PERLQQ|ENCODE_LEAVE_SRC : SvIV_nomg(check_sv);
+    fallback_cb = SvROK(check_sv) ? check_sv : &PL_sv_undef;
+    modify = (check && !(check & ENCODE_LEAVE_SRC));
+    enc = INT2PTR(encode_t *, SvIV(SvRV(obj)));
 CODE:
 {
     if (!SvOK(src))

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About