]> granicus.if.org Git - php/commitdiff
- using _ex() functions now, thanks to Andrej.
authorKristian Köhntopp <kk@php.net>
Sun, 12 Mar 2000 19:08:52 +0000 (19:08 +0000)
committerKristian Köhntopp <kk@php.net>
Sun, 12 Mar 2000 19:08:52 +0000 (19:08 +0000)
ext/recode/recode.c

index 075630328e85f00b51460df662d6cfa0cf4a0850..a7acbb67cce8ddeb4fc11027cdd41426d5866872 100644 (file)
@@ -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;