summaryrefslogtreecommitdiff
path: root/ext/recode
diff options
context:
space:
mode:
authorKristian Köhntopp <kk@php.net>2000-03-12 19:08:52 +0000
committerKristian Köhntopp <kk@php.net>2000-03-12 19:08:52 +0000
commit63fb0326e90f63473c46ac3510b70ba6913b9afe (patch)
tree300336fc6e412f47b4dc74a2435abfebbdfa1331 /ext/recode
parentd0b9a3989b491546258206f9160a935e1299091b (diff)
downloadphp-git-63fb0326e90f63473c46ac3510b70ba6913b9afe.tar.gz
- using _ex() functions now, thanks to Andrej.
Diffstat (limited to 'ext/recode')
-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;