summaryrefslogtreecommitdiff
path: root/ext/bcmath/libbcmath/src
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2017-09-08 16:24:38 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2017-09-08 16:24:38 +0200
commit657695fe9777d0e91ee988afc8cb8a07120bdd2d (patch)
treea9ad0a148b815b766e763381e152af03c1175ade /ext/bcmath/libbcmath/src
parentf5ef1a83a8882ecee43329126050a015233aecfb (diff)
downloadphp-git-657695fe9777d0e91ee988afc8cb8a07120bdd2d.tar.gz
Remove unused member
The `n_next` member of struct `bc_struct` is unused; the only code that would use this member has been disabled since libbcmath has been bundled nearly 17 years ago. Apparently, `n_next` has been designed to build a linked list of free numbers, but it is doubtful whether that would be an improvement over relying on the efficiency of the ZendMM, so we remove the remaining support altogether. The ABI break probably affects nobody, but would be okay for a new minor version according to our release process, anyway.
Diffstat (limited to 'ext/bcmath/libbcmath/src')
-rw-r--r--ext/bcmath/libbcmath/src/bcmath.h1
-rw-r--r--ext/bcmath/libbcmath/src/init.c12
2 files changed, 0 insertions, 13 deletions
diff --git a/ext/bcmath/libbcmath/src/bcmath.h b/ext/bcmath/libbcmath/src/bcmath.h
index 28d275d32c..b83ba13558 100644
--- a/ext/bcmath/libbcmath/src/bcmath.h
+++ b/ext/bcmath/libbcmath/src/bcmath.h
@@ -42,7 +42,6 @@ typedef struct bc_struct
int n_len; /* The number of digits before the decimal point. */
int n_scale; /* The number of digits after the decimal point. */
int n_refs; /* The number of pointers to this number. */
- bc_num n_next; /* Linked list for available list. */
char *n_ptr; /* The pointer to the actual storage.
If NULL, n_value points to the inside of
another number (bc_multiply...) and should
diff --git a/ext/bcmath/libbcmath/src/init.c b/ext/bcmath/libbcmath/src/init.c
index 229ef05002..bd73da2a9d 100644
--- a/ext/bcmath/libbcmath/src/init.c
+++ b/ext/bcmath/libbcmath/src/init.c
@@ -51,14 +51,6 @@ _bc_new_num_ex (length, scale, persistent)
}
/* PHP Change: malloc() -> pemalloc(), removed free_list code */
temp = (bc_num) safe_pemalloc (1, sizeof(bc_struct)+length, scale, persistent);
-#if 0
- if (_bc_Free_list != NULL) {
- temp = _bc_Free_list;
- _bc_Free_list = temp->n_next;
- } else {
- temp = (bc_num) pemalloc (sizeof(bc_struct), persistent);
- }
-#endif
temp->n_sign = PLUS;
temp->n_len = length;
temp->n_scale = scale;
@@ -86,10 +78,6 @@ _bc_free_num_ex (num, persistent)
/* PHP Change: free() -> pefree(), removed free_list code */
pefree ((*num)->n_ptr, persistent);
pefree(*num, persistent);
-#if 0
- (*num)->n_next = _bc_Free_list;
- _bc_Free_list = *num;
-#endif
}
*num = NULL;
}