summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/recode/recode.c29
1 files 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;