com php-src: Remove dead code from BCMath extension: ext/bcmath/libbcmath/src/init.c ext/bcmath/libbcmath/src/private.h ext/bcmath/libbcmath/src/recmul.c

[email protected] (Nikita Popov)
Newsgroups php.cvs
Message-ID <[email protected]>
Commit:    9d9defa29aafd3b8cfaed8c6e3f8e59c98d0fcb7
Author:    Thomas Punt <[email protected]>         Wed, 15 Mar 2017 17:09:26 +0000
Committer: Nikita Popov <[email protected]>      Thu, 16 Mar 2017 12:23:55 +0100
Parents:   6ad0a6fb047f47532ccb4513600fb6c269ad610e
Branches:  master

Link:       http://git.php.net/?p=php-src.git;a=commitdiff;h=9d9defa29aafd3b8cfaed8c6e3f8e59c98d0fcb7

Log:
Remove dead code from BCMath extension

Changed paths:
  M  ext/bcmath/libbcmath/src/init.c
  M  ext/bcmath/libbcmath/src/private.h
  M  ext/bcmath/libbcmath/src/recmul.c


Diff:
diff --git a/ext/bcmath/libbcmath/src/init.c b/ext/bcmath/libbcmath/src/init.c
index fe4ad25..229ef05 100644
--- a/ext/bcmath/libbcmath/src/init.c
+++ b/ext/bcmath/libbcmath/src/init.c
@@ -38,10 +38,6 @@
 #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_));
 }
-
diff --git a/ext/bcmath/libbcmath/src/private.h b/ext/bcmath/libbcmath/src/private.h
index dedf2b8..32e1120 100644
--- a/ext/bcmath/libbcmath/src/private.h
+++ b/ext/bcmath/libbcmath/src/private.h
@@ -31,11 +31,6 @@
 
 /* "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);
diff --git a/ext/bcmath/libbcmath/src/recmul.c b/ext/bcmath/libbcmath/src/recmul.c
index bc1682e..e397359 100644
--- a/ext/bcmath/libbcmath/src/recmul.c
+++ b/ext/bcmath/libbcmath/src/recmul.c
@@ -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;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.