]> granicus.if.org Git - php/commitdiff
Use RETVAL_ASCII_STRINGL() here.
authorAndrei Zmievski <andrei@php.net>
Fri, 19 Aug 2005 17:53:03 +0000 (17:53 +0000)
committerAndrei Zmievski <andrei@php.net>
Fri, 19 Aug 2005 17:53:03 +0000 (17:53 +0000)
ext/standard/string.c

index 2e6dcf4861cb33a1685422d861284897541d7756..1b8d6bfe4961c9a27dbf790a58963741d27a87d1 100644 (file)
@@ -200,12 +200,9 @@ PHP_FUNCTION(bin2hex)
                RETURN_FALSE;
        }
 
+       RETVAL_ASCII_STRINGL(result, newlen, 0);
        if (UG(unicode)) {
-               UChar *u_temp = zend_ascii_to_unicode(result, newlen+1 ZEND_FILE_LINE_CC);
                efree(result);
-               RETVAL_UNICODEL(u_temp, newlen, 0);
-       } else {
-               RETURN_STRINGL(result, newlen, 0);
        }
 }
 /* }}} */