From 63fb0326e90f63473c46ac3510b70ba6913b9afe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20K=C3=B6hntopp?= Date: Sun, 12 Mar 2000 19:08:52 +0000 Subject: [PATCH] - using _ex() functions now, thanks to Andrej. --- ext/recode/recode.c | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/ext/recode/recode.c b/ext/recode/recode.c index 075630328e..a7acbb67cc 100644 --- a/ext/recode/recode.c +++ b/ext/recode/recode.c @@ -100,36 +100,19 @@ PHP_MINFO_FUNCTION(recode) PHP_FUNCTION(recode_string) { -/* All of this cores in zend_get_parameters_ex()... - RECODE_REQUEST request = NULL; + char *r = NULL; pval **str; pval **req; - char *r; - bool success; + bool success; ReSLS_FETCH(); if (ARG_COUNT(ht) != 2 - || zend_get_parameters_ex(ht, 2, &req, &str) == FAILURE) { + || zend_get_parameters_ex(2, &req, &str) == FAILURE) { WRONG_PARAM_COUNT; } convert_to_string_ex(str); convert_to_string_ex(req); -*/ - - RECODE_REQUEST request = NULL; - char *r = NULL; - pval *str; - pval *req; - bool success; - - ReSLS_FETCH(); - if (ARG_COUNT(ht) != 2 - || zend_get_parameters(ht, 2, &req, &str) == FAILURE) { - WRONG_PARAM_COUNT; - } - convert_to_string(str); - convert_to_string(req); request = recode_new_request(ReSG(outer)); if (request == NULL) { @@ -137,13 +120,13 @@ PHP_FUNCTION(recode_string) RETURN_FALSE; } - success = recode_scan_request(request, req->value.str.val); + success = recode_scan_request(request, (*req)->value.str.val); if (!success) { - php_error(E_WARNING, "Illegal recode request '%s'", req->value.str.val); + php_error(E_WARNING, "Illegal recode request '%s'", (*req)->value.str.val); goto error_exit; } - r = recode_string(request, str->value.str.val); + r = recode_string(request, (*str)->value.str.val); if (!r) { php_error(E_WARNING, "Recoding failed."); goto error_exit; -- 2.40.0