Use new param API in ctype

This commit is contained in:
Sara Golemon 2016-12-28 09:11:53 -08:00
parent 994170ea80
commit 0e4c675736

View File

@ -144,8 +144,9 @@ static PHP_MINFO_FUNCTION(ctype)
*/ */
#define CTYPE(iswhat) \ #define CTYPE(iswhat) \
zval *c, tmp; \ zval *c, tmp; \
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &c) == FAILURE) \ ZEND_PARSE_PARAMETERS_START(1, 1); \
return; \ Z_PARAM_ZVAL_DEREF(c) \
ZEND_PARSE_PARAMETERS_END(); \
if (Z_TYPE_P(c) == IS_LONG) { \ if (Z_TYPE_P(c) == IS_LONG) { \
if (Z_LVAL_P(c) <= 255 && Z_LVAL_P(c) >= 0) { \ if (Z_LVAL_P(c) <= 255 && Z_LVAL_P(c) >= 0) { \
RETURN_BOOL(iswhat((int)Z_LVAL_P(c))); \ RETURN_BOOL(iswhat((int)Z_LVAL_P(c))); \