Skip to content

Commit 7555b2f

Browse files
committed
Removed bc_add_ex, bc_int2num, and bc_raise_bc_exponent as they are no longer used.
1 parent aef9c17 commit 7555b2f

File tree

5 files changed

+1
-100
lines changed

5 files changed

+1
-100
lines changed

ext/bcmath/config.m4

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ if test "$PHP_BCMATH" != "no"; then
1515
libbcmath/src/floor_or_ceil.c
1616
libbcmath/src/long2num.c
1717
libbcmath/src/init.c
18-
libbcmath/src/int2num.c
1918
libbcmath/src/neg.c
2019
libbcmath/src/num2long.c
2120
libbcmath/src/num2str.c

ext/bcmath/config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ARG_ENABLE("bcmath", "bc style precision math functions", "yes");
55
if (PHP_BCMATH == "yes") {
66
EXTENSION("bcmath", "bcmath.c", null, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
77
ADD_SOURCES("ext/bcmath/libbcmath/src", "add.c div.c init.c neg.c \
8-
raisemod.c sub.c compare.c divmod.c int2num.c long2num.c \
8+
raisemod.c sub.c compare.c divmod.c long2num.c \
99
num2long.c recmul.c sqrt.c zero.c doaddsub.c \
1010
floor_or_ceil.c num2str.c raise.c rmzero.c str2num.c \
1111
round.c convert.c", "bcmath");

ext/bcmath/libbcmath/src/bcmath.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,6 @@ void bc_rm_trailing_zeros(bc_num num);
123123

124124
bc_num bc_add(bc_num n1, bc_num n2, size_t scale_min);
125125

126-
#define bc_add_ex(n1, n2, result, scale_min) do { \
127-
bc_num add_ex = bc_add(n1, n2, scale_min); \
128-
bc_free_num (result); \
129-
*(result) = add_ex; \
130-
} while (0)
131-
132126
bc_num bc_sub(bc_num n1, bc_num n2, size_t scale_min);
133127

134128
#define bc_sub_ex(n1, n2, result, scale_min) do { \
@@ -176,8 +170,6 @@ raise_mod_status bc_raisemod(bc_num base, bc_num exponent, bc_num mod, bc_num *r
176170

177171
bc_raise_status bc_raise(bc_num base, long exponent, bc_num *result, size_t scale);
178172

179-
void bc_raise_bc_exponent(bc_num base, bc_num exponent, bc_num *resul, size_t scale);
180-
181173
bool bc_sqrt(bc_num *num, size_t scale);
182174

183175
/* Prototypes needed for external utility routines. */

ext/bcmath/libbcmath/src/int2num.c

Lines changed: 0 additions & 74 deletions
This file was deleted.

ext/bcmath/libbcmath/src/raise.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -252,19 +252,3 @@ bc_raise_status bc_raise(bc_num base, long exponent, bc_num *result, size_t scal
252252
}
253253
return BC_RAISE_STATUS_OK;
254254
}
255-
256-
/* This is used internally by BCMath */
257-
void bc_raise_bc_exponent(bc_num base, bc_num expo, bc_num *result, size_t scale) {
258-
/* Exponent must not have fractional part */
259-
assert(expo->n_scale == 0);
260-
261-
long exponent = bc_num2long(expo);
262-
/* Exponent must be properly convertable to long */
263-
if (exponent == 0 && (expo->n_len > 1 || expo->n_value[0] != 0)) {
264-
assert(false && "Exponent is not well formed in internal call");
265-
//assert(exponent != 0 || (expo->n_len == 0 && expo->n_value[0] == 0));
266-
}
267-
//assert(exponent != 0 || (expo->n_len == 0 && expo->n_value[0] == 0));
268-
bc_raise(base, exponent, result, scale);
269-
}
270-

0 commit comments

Comments
 (0)