iliaa           Wed May 23 15:01:00 2007 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/standard       math.c 
  Log:
  
  Simplify code
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/math.c?r1=1.131.2.2.2.5&r2=1.131.2.2.2.6&diff_format=u
Index: php-src/ext/standard/math.c
diff -u php-src/ext/standard/math.c:1.131.2.2.2.5 
php-src/ext/standard/math.c:1.131.2.2.2.6
--- php-src/ext/standard/math.c:1.131.2.2.2.5   Mon Jan  1 09:36:08 2007
+++ php-src/ext/standard/math.c Wed May 23 15:01:00 2007
@@ -19,7 +19,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: math.c,v 1.131.2.2.2.5 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: math.c,v 1.131.2.2.2.6 2007/05/23 15:01:00 iliaa Exp $ */
 
 #include "php.h"
 #include "php_math.h"
@@ -880,9 +880,7 @@
        convert_to_long_ex(arg);
 
        result = _php_math_longtobase(*arg, 2);
-       Z_TYPE_P(return_value) = IS_STRING;
-       Z_STRLEN_P(return_value) = strlen(result);
-       Z_STRVAL_P(return_value) = result;
+       RETURN_STRING(result, 0);
 }
 /* }}} */
 
@@ -900,9 +898,7 @@
        convert_to_long_ex(arg);
 
        result = _php_math_longtobase(*arg, 8);
-       Z_TYPE_P(return_value) = IS_STRING;
-       Z_STRLEN_P(return_value) = strlen(result);
-       Z_STRVAL_P(return_value) = result;
+       RETURN_STRING(result, 0);
 }
 /* }}} */
 
@@ -920,9 +916,7 @@
        convert_to_long_ex(arg);
 
        result = _php_math_longtobase(*arg, 16);
-       Z_TYPE_P(return_value) = IS_STRING;
-       Z_STRLEN_P(return_value) = strlen(result);
-       Z_STRVAL_P(return_value) = result;
+       RETURN_STRING(result, 0);
 }
 /* }}} */
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to