diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2017-09-08 16:24:38 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2017-09-08 16:24:38 +0200 |
commit | 657695fe9777d0e91ee988afc8cb8a07120bdd2d (patch) | |
tree | a9ad0a148b815b766e763381e152af03c1175ade | |
parent | f5ef1a83a8882ecee43329126050a015233aecfb (diff) | |
download | php-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.
-rw-r--r-- | ext/bcmath/libbcmath/src/bcmath.h | 1 | ||||
-rw-r--r-- | ext/bcmath/libbcmath/src/init.c | 12 |
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; } |