Simplify code

This commit is contained in:
Ilia Alshanetsky 2007-05-23 15:01:00 +00:00
parent a6a989d44c
commit 6f694fab9a

View File

@ -880,9 +880,7 @@ PHP_FUNCTION(decbin)
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 @@ PHP_FUNCTION(decoct)
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 @@ PHP_FUNCTION(dechex)
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);
}
/* }}} */