diff options
author | Karl Williamson <khw@cpan.org> | 2016-02-11 20:24:37 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2016-02-11 20:29:08 -0700 |
commit | 47ed9d9e89922a8e165d6dfc5737772cc5ee7a45 (patch) | |
tree | 9469d65f743aabaeb8aadd4d47c15f2e4a149c75 /ext/POSIX/POSIX.xs | |
parent | bef74c256c389edeb1dfa9c30dc71e00d17476eb (diff) | |
download | perl-47ed9d9e89922a8e165d6dfc5737772cc5ee7a45.tar.gz |
Remove POSIX isfoo() as scheduled
The functions like isalnum() have been scheduled for removal in 5.24.
This does that.
Diffstat (limited to 'ext/POSIX/POSIX.xs')
-rw-r--r-- | ext/POSIX/POSIX.xs | 96 |
1 files changed, 0 insertions, 96 deletions
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 12da49fb0a..f46fedc430 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -1778,102 +1778,6 @@ my_tzset(pTHX) tzset(); } -typedef int (*isfunc_t)(int); -typedef void (*any_dptr_t)(void *); - -/* This needs to be ALIASed in a custom way, hence can't easily be defined as - a regular XSUB. */ -static XSPROTO(is_common); /* prototype to pass -Wmissing-prototypes */ -static XSPROTO(is_common) -{ - dXSARGS; - - if (items != 1) - croak_xs_usage(cv, "charstring"); - - { - dXSTARG; - STRLEN len; - /*int RETVAL = 0; YYY means uncomment this to return false on an - * empty string input */ - int RETVAL; - unsigned char *s = (unsigned char *) SvPV(ST(0), len); - unsigned char *e = s + len; - isfunc_t isfunc = (isfunc_t) XSANY.any_dptr; - - if (ckWARN_d(WARN_DEPRECATED)) { - - /* Warn exactly once for each lexical place this function is - * called. See thread at - * http://markmail.org/thread/jhqcag5njmx7jpyu */ - - HV *warned = get_hv("POSIX::_warned", GV_ADD | GV_ADDMULTI); - if (! hv_exists(warned, (const char *)&PL_op, sizeof(PL_op))) { - Perl_warner(aTHX_ packWARN(WARN_DEPRECATED), - "Calling POSIX::%"HEKf"() is deprecated", - HEKfARG(GvNAME_HEK(CvGV(cv)))); - (void)hv_store(warned, (const char *)&PL_op, sizeof(PL_op), &PL_sv_yes, 0); - } - } - - /*if (e > s) { YYY */ - for (RETVAL = 1; RETVAL && s < e; s++) - if (!isfunc(*s)) - RETVAL = 0; - /*} YYY */ - XSprePUSH; - PUSHi((IV)RETVAL); - } - XSRETURN(1); -} - -MODULE = POSIX PACKAGE = POSIX - -BOOT: -{ - CV *cv; - - - /* silence compiler warning about not_here() defined but not used */ - if (0) not_here(""); - - /* Ensure we get the function, not a macro implementation. Like the C89 - standard says we can... */ -#undef isalnum - cv = newXS_deffile("POSIX::isalnum", is_common); - XSANY.any_dptr = (any_dptr_t) &isalnum; -#undef isalpha - cv = newXS_deffile("POSIX::isalpha", is_common); - XSANY.any_dptr = (any_dptr_t) &isalpha; -#undef iscntrl - cv = newXS_deffile("POSIX::iscntrl", is_common); - XSANY.any_dptr = (any_dptr_t) &iscntrl; -#undef isdigit - cv = newXS_deffile("POSIX::isdigit", is_common); - XSANY.any_dptr = (any_dptr_t) &isdigit; -#undef isgraph - cv = newXS_deffile("POSIX::isgraph", is_common); - XSANY.any_dptr = (any_dptr_t) &isgraph; -#undef islower - cv = newXS_deffile("POSIX::islower", is_common); - XSANY.any_dptr = (any_dptr_t) &islower; -#undef isprint - cv = newXS_deffile("POSIX::isprint", is_common); - XSANY.any_dptr = (any_dptr_t) &isprint; -#undef ispunct - cv = newXS_deffile("POSIX::ispunct", is_common); - XSANY.any_dptr = (any_dptr_t) &ispunct; -#undef isspace - cv = newXS_deffile("POSIX::isspace", is_common); - XSANY.any_dptr = (any_dptr_t) &isspace; -#undef isupper - cv = newXS_deffile("POSIX::isupper", is_common); - XSANY.any_dptr = (any_dptr_t) &isupper; -#undef isxdigit - cv = newXS_deffile("POSIX::isxdigit", is_common); - XSANY.any_dptr = (any_dptr_t) &isxdigit; -} - MODULE = SigSet PACKAGE = POSIX::SigSet PREFIX = sig void |