com php-src: Remove unused member: ext/bcmath/libbcmath/src/bcmath.h ext/bcmath/libbcmath/src/init.c

From: Date: Fri, 08 Sep 2017 14:24:38 +0000
Subject: com php-src: Remove unused member: ext/bcmath/libbcmath/src/bcmath.h ext/bcmath/libbcmath/src/init.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-99325@lists.php.net to get a copy of this message
Commit: 657695fe9777d0e91ee988afc8cb8a07120bdd2d Author: Christoph M. Becker <cmbecker69@gmx.de> Fri, 8 Sep 2017 16:24:38 +0200 Parents: f5ef1a83a8882ecee43329126050a015233aecfb Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=657695fe9777d0e91ee988afc8cb8a07120bdd2d Log: 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. Changed paths: M ext/bcmath/libbcmath/src/bcmath.h M ext/bcmath/libbcmath/src/init.c Diff: diff --git a/ext/bcmath/libbcmath/src/bcmath.h b/ext/bcmath/libbcmath/src/bcmath.h index 28d275d..b83ba13 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 229ef05..bd73da2 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; }

« previous php.cvs (#99325) next »