]> granicus.if.org Git - php/commitdiff
Remove dead code from BCMath extension
authorThomas Punt <tpunt@hotmail.co.uk>
Wed, 15 Mar 2017 17:09:26 +0000 (17:09 +0000)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 16 Mar 2017 11:23:55 +0000 (12:23 +0100)
ext/bcmath/libbcmath/src/init.c
ext/bcmath/libbcmath/src/private.h
ext/bcmath/libbcmath/src/recmul.c

index fe4ad256881e1cff45ef451266012f2b006f5245..229ef050027229e116c93543d88e023f0a8b3826 100644 (file)
 #include "bcmath.h"
 #include "private.h"
 
-#if SANDER_0
- bc_num _bc_Free_list = NULL;
-#endif
-
 /* new_num allocates a number and sets fields to known values. */
 
 bc_num
@@ -129,4 +125,3 @@ bc_init_num (bc_num *num)
 {
   *num = bc_copy_num (BCG(_zero_));
 }
-
index dedf2b89187f3bff0c25c411d2e8eef06f13d1b2..32e112076141c208a7d25595460c2aed5bdeb9ca 100644 (file)
 
 /* "Private" routines to bcmath. */
 
-/* variables */
-#if SANDER_0
-extern bc_num _bc_Free_list;
-#endif
-
 /* routines */
 int _bc_do_compare (bc_num n1, bc_num n2, int use_sign, int ignore_last);
 bc_num _bc_do_add (bc_num n1, bc_num n2, int scale_min);
index bc1682edcdb2d157ec3914f39a94ef9f68400d03..e3973597901f02ba70e704c257cae36407813f47 100644 (file)
@@ -57,17 +57,8 @@ new_sub_num (length, scale, value)
 {
   bc_num temp;
 
-#ifdef SANDER_0
-  if (_bc_Free_list != NULL) {
-    temp = _bc_Free_list;
-    _bc_Free_list = temp->n_next;
-  } else {
-#endif
-    temp = (bc_num) emalloc (sizeof(bc_struct));
-#ifdef SANDER_0
-    if (temp == NULL) bc_out_of_memory ();
-  }
-#endif
+  temp = (bc_num) emalloc (sizeof(bc_struct));
+
   temp->n_sign = PLUS;
   temp->n_len = length;
   temp->n_scale = scale;