From: Ed Santiago Date: Tue, 27 Aug 2002 22:10:16 +0000 (+0000) Subject: Fix based on: X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d4e900e09d841ca8d48fcd75d5be63ec52dc96d1;p=p5sagit%2Fp5-mst-13.2.git Fix based on: Subject: [perl #16799] Perl 5.8.0 breaks POSIX::isprint() (and other POSIX::xxx) From: "esm@pobox.com (via RT)" Message-Id: p4raw-id: //depot/perl@17805 --- diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 2eab956..9a4fc02 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -843,7 +843,7 @@ isalnum(charstring) unsigned char * charstring CODE: unsigned char *s = charstring; - unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */ + unsigned char *e = s + SvCUR(ST(0)); for (RETVAL = 1; RETVAL && s < e; s++) if (!isalnum(*s)) RETVAL = 0; @@ -855,7 +855,7 @@ isalpha(charstring) unsigned char * charstring CODE: unsigned char *s = charstring; - unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */ + unsigned char *e = s + SvCUR(ST(0)); for (RETVAL = 1; RETVAL && s < e; s++) if (!isalpha(*s)) RETVAL = 0; @@ -867,7 +867,7 @@ iscntrl(charstring) unsigned char * charstring CODE: unsigned char *s = charstring; - unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */ + unsigned char *e = s + SvCUR(ST(0)); for (RETVAL = 1; RETVAL && s < e; s++) if (!iscntrl(*s)) RETVAL = 0; @@ -879,7 +879,7 @@ isdigit(charstring) unsigned char * charstring CODE: unsigned char *s = charstring; - unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */ + unsigned char *e = s + SvCUR(ST(0)); for (RETVAL = 1; RETVAL && s < e; s++) if (!isdigit(*s)) RETVAL = 0; @@ -891,7 +891,7 @@ isgraph(charstring) unsigned char * charstring CODE: unsigned char *s = charstring; - unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */ + unsigned char *e = s + SvCUR(ST(0)); for (RETVAL = 1; RETVAL && s < e; s++) if (!isgraph(*s)) RETVAL = 0; @@ -903,7 +903,7 @@ islower(charstring) unsigned char * charstring CODE: unsigned char *s = charstring; - unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */ + unsigned char *e = s + SvCUR(ST(0)); for (RETVAL = 1; RETVAL && s < e; s++) if (!islower(*s)) RETVAL = 0; @@ -915,7 +915,7 @@ isprint(charstring) unsigned char * charstring CODE: unsigned char *s = charstring; - unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */ + unsigned char *e = s + SvCUR(ST(0)); for (RETVAL = 1; RETVAL && s < e; s++) if (!isprint(*s)) RETVAL = 0; @@ -927,7 +927,7 @@ ispunct(charstring) unsigned char * charstring CODE: unsigned char *s = charstring; - unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */ + unsigned char *e = s + SvCUR(ST(0)); for (RETVAL = 1; RETVAL && s < e; s++) if (!ispunct(*s)) RETVAL = 0; @@ -939,7 +939,7 @@ isspace(charstring) unsigned char * charstring CODE: unsigned char *s = charstring; - unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */ + unsigned char *e = s + SvCUR(ST(0)); for (RETVAL = 1; RETVAL && s < e; s++) if (!isspace(*s)) RETVAL = 0; @@ -951,7 +951,7 @@ isupper(charstring) unsigned char * charstring CODE: unsigned char *s = charstring; - unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */ + unsigned char *e = s + SvCUR(ST(0)); for (RETVAL = 1; RETVAL && s < e; s++) if (!isupper(*s)) RETVAL = 0; @@ -963,7 +963,7 @@ isxdigit(charstring) unsigned char * charstring CODE: unsigned char *s = charstring; - unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */ + unsigned char *e = s + SvCUR(ST(0)); for (RETVAL = 1; RETVAL && s < e; s++) if (!isxdigit(*s)) RETVAL = 0;