unsigned char * charstring
CODE:
unsigned char *s = charstring;
- unsigned char *e = s + SvCUR(ST(0));
+ unsigned char *e = SvPOK(ST(0)) ? s + SvCUR(ST(0)) : (unsigned char*)0;
for (RETVAL = 1; RETVAL && s < e; s++)
if (!isalnum(*s))
RETVAL = 0;
unsigned char * charstring
CODE:
unsigned char *s = charstring;
- unsigned char *e = s + SvCUR(ST(0));
+ unsigned char *e = SvPOK(ST(0)) ? s + SvCUR(ST(0)) : (unsigned char*)0;
for (RETVAL = 1; RETVAL && s < e; s++)
if (!isalpha(*s))
RETVAL = 0;
unsigned char * charstring
CODE:
unsigned char *s = charstring;
- unsigned char *e = s + SvCUR(ST(0));
+ unsigned char *e = SvPOK(ST(0)) ? s + SvCUR(ST(0)) : (unsigned char*)0;
for (RETVAL = 1; RETVAL && s < e; s++)
if (!iscntrl(*s))
RETVAL = 0;
unsigned char * charstring
CODE:
unsigned char *s = charstring;
- unsigned char *e = s + SvCUR(ST(0));
+ unsigned char *e = SvPOK(ST(0)) ? s + SvCUR(ST(0)) : (unsigned char*)0;
for (RETVAL = 1; RETVAL && s < e; s++)
if (!isdigit(*s))
RETVAL = 0;
unsigned char * charstring
CODE:
unsigned char *s = charstring;
- unsigned char *e = s + SvCUR(ST(0));
+ unsigned char *e = SvPOK(ST(0)) ? s + SvCUR(ST(0)) : (unsigned char*)0;
for (RETVAL = 1; RETVAL && s < e; s++)
if (!isgraph(*s))
RETVAL = 0;
unsigned char * charstring
CODE:
unsigned char *s = charstring;
- unsigned char *e = s + SvCUR(ST(0));
+ unsigned char *e = SvPOK(ST(0)) ? s + SvCUR(ST(0)) : (unsigned char*)0;
for (RETVAL = 1; RETVAL && s < e; s++)
if (!islower(*s))
RETVAL = 0;
unsigned char * charstring
CODE:
unsigned char *s = charstring;
- unsigned char *e = s + SvCUR(ST(0));
+ unsigned char *e = SvPOK(ST(0)) ? s + SvCUR(ST(0)) : (unsigned char*)0;
for (RETVAL = 1; RETVAL && s < e; s++)
if (!isprint(*s))
RETVAL = 0;
unsigned char * charstring
CODE:
unsigned char *s = charstring;
- unsigned char *e = s + SvCUR(ST(0));
+ unsigned char *e = SvPOK(ST(0)) ? s + SvCUR(ST(0)) : (unsigned char*)0;
for (RETVAL = 1; RETVAL && s < e; s++)
if (!ispunct(*s))
RETVAL = 0;
unsigned char * charstring
CODE:
unsigned char *s = charstring;
- unsigned char *e = s + SvCUR(ST(0));
+ unsigned char *e = SvPOK(ST(0)) ? s + SvCUR(ST(0)) : (unsigned char*)0;
for (RETVAL = 1; RETVAL && s < e; s++)
if (!isspace(*s))
RETVAL = 0;
unsigned char * charstring
CODE:
unsigned char *s = charstring;
- unsigned char *e = s + SvCUR(ST(0));
+ unsigned char *e = SvPOK(ST(0)) ? s + SvCUR(ST(0)) : (unsigned char*)0;
for (RETVAL = 1; RETVAL && s < e; s++)
if (!isupper(*s))
RETVAL = 0;
unsigned char * charstring
CODE:
unsigned char *s = charstring;
- unsigned char *e = s + SvCUR(ST(0));
+ unsigned char *e = SvPOK(ST(0)) ? s + SvCUR(ST(0)) : (unsigned char*)0;
for (RETVAL = 1; RETVAL && s < e; s++)
if (!isxdigit(*s))
RETVAL = 0;
}
require "./test.pl";
-plan(tests => 61);
+plan(tests => 63);
use POSIX qw(fcntl_h signal_h limits_h _exit getcwd open read strftime write
errno);
ok(!POSIX::isspace('_'), 'isspace' );
ok( POSIX::isxdigit('f'), 'isxdigit' );
ok(!POSIX::isxdigit('g'), 'isxdigit' );
+# metaphysical question : what should be returned for an empty string ?
+# anyway this shouldn't segfault (bug #24554)
+ok( POSIX::isalnum(''), 'isalnum empty string' );
+ok( POSIX::isalnum(undef),'isalnum undef' );
# Check that output is not flushed by _exit. This test should be last
# in the file, and is not counted in the total number of tests.