Skip to content

Commit 7e149b5

Browse files
committed
Consistent naming
1 parent 801bd96 commit 7e149b5

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

ext/bcmath/bcmath.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -416,16 +416,16 @@ PHP_FUNCTION(bcmod)
416416
/* {{{ Returns the value of an arbitrary precision number raised to the power of another reduced by a modulus */
417417
PHP_FUNCTION(bcpowmod)
418418
{
419-
zend_string *base, *exponent, *modulus;
419+
zend_string *base_str, *exponent_str, *modulus_str;
420420
zend_long scale_param;
421421
bool scale_param_is_null = 1;
422422
bc_num bc_base, bc_expo, bc_modulus, result;
423423
int scale = BCG(bc_precision);
424424

425425
ZEND_PARSE_PARAMETERS_START(3, 4)
426-
Z_PARAM_STR(base)
427-
Z_PARAM_STR(exponent)
428-
Z_PARAM_STR(modulus)
426+
Z_PARAM_STR(base_str)
427+
Z_PARAM_STR(exponent_str)
428+
Z_PARAM_STR(modulus_str)
429429
Z_PARAM_OPTIONAL
430430
Z_PARAM_LONG_OR_NULL(scale_param, scale_param_is_null)
431431
ZEND_PARSE_PARAMETERS_END();
@@ -444,17 +444,17 @@ PHP_FUNCTION(bcpowmod)
444444
bc_init_num(&bc_modulus);
445445
bc_init_num(&result);
446446

447-
if (php_str2num(&bc_base, ZSTR_VAL(base)) == FAILURE) {
447+
if (php_str2num(&bc_base, ZSTR_VAL(base_str)) == FAILURE) {
448448
zend_argument_value_error(1, "is not well-formed");
449449
goto cleanup;
450450
}
451451

452-
if (php_str2num(&bc_expo, ZSTR_VAL(exponent)) == FAILURE) {
452+
if (php_str2num(&bc_expo, ZSTR_VAL(exponent_str)) == FAILURE) {
453453
zend_argument_value_error(2, "is not well-formed");
454454
goto cleanup;
455455
}
456456

457-
if (php_str2num(&bc_modulus, ZSTR_VAL(modulus)) == FAILURE) {
457+
if (php_str2num(&bc_modulus, ZSTR_VAL(modulus_str)) == FAILURE) {
458458
zend_argument_value_error(3, "is not well-formed");
459459
goto cleanup;
460460
}
@@ -494,15 +494,15 @@ PHP_FUNCTION(bcpowmod)
494494
/* {{{ Returns the value of an arbitrary precision number raised to the power of another */
495495
PHP_FUNCTION(bcpow)
496496
{
497-
zend_string *left, *right;
497+
zend_string *base_str, *exponent_str;
498498
zend_long scale_param;
499499
bool scale_param_is_null = 1;
500500
bc_num first, bc_exponent, result;
501501
int scale = BCG(bc_precision);
502502

503503
ZEND_PARSE_PARAMETERS_START(2, 3)
504-
Z_PARAM_STR(left)
505-
Z_PARAM_STR(right)
504+
Z_PARAM_STR(base_str)
505+
Z_PARAM_STR(exponent_str)
506506
Z_PARAM_OPTIONAL
507507
Z_PARAM_LONG_OR_NULL(scale_param, scale_param_is_null)
508508
ZEND_PARSE_PARAMETERS_END();
@@ -520,12 +520,12 @@ PHP_FUNCTION(bcpow)
520520
bc_init_num(&bc_exponent);
521521
bc_init_num(&result);
522522

523-
if (php_str2num(&first, ZSTR_VAL(left)) == FAILURE) {
523+
if (php_str2num(&first, ZSTR_VAL(base_str)) == FAILURE) {
524524
zend_argument_value_error(1, "is not well-formed");
525525
goto cleanup;
526526
}
527527

528-
if (php_str2num(&bc_exponent, ZSTR_VAL(right)) == FAILURE) {
528+
if (php_str2num(&bc_exponent, ZSTR_VAL(exponent_str)) == FAILURE) {
529529
zend_argument_value_error(2, "is not well-formed");
530530
goto cleanup;
531531
}

ext/bcmath/libbcmath/src/bcmath.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ typedef enum {
134134
MOD_IS_ZERO
135135
} raise_mod_status;
136136

137-
raise_mod_status bc_raisemod(bc_num base, bc_num expo, bc_num mod, bc_num *result, size_t scale);
137+
raise_mod_status bc_raisemod(bc_num base, bc_num exponent, bc_num mod, bc_num *result, size_t scale);
138138

139139
void bc_raise(bc_num base, long exponent, bc_num *resul, size_t scale);
140140

0 commit comments

Comments
 (0)