From 94c14ad4f6c18dbe6ade1a8d62f895002066f1dd Mon Sep 17 00:00:00 2001 From: Hartmut Holzgraefe Date: Fri, 8 Mar 2002 11:59:02 +0000 Subject: [PATCH] reimplementation using macro instead of function pointer ( Bug #15951 ) --- ext/ctype/ctype.c | 165 ++++++++++------------------------------------ 1 file changed, 34 insertions(+), 131 deletions(-) diff --git a/ext/ctype/ctype.c b/ext/ctype/ctype.c index 59a16455e1..1298298ed5 100644 --- a/ext/ctype/ctype.c +++ b/ext/ctype/ctype.c @@ -91,43 +91,36 @@ PHP_MINFO_FUNCTION(ctype) /* {{{ ctype */ -static int ctype(int (*iswhat)(int), zval **c) -{ - switch (Z_TYPE_PP(c)) { - case IS_LONG: - return iswhat(Z_LVAL_PP(c)); - case IS_STRING: - { - char *p; - int n, len; - p=Z_STRVAL_PP(c); - len = Z_STRLEN_PP(c); - for(n=0;n