com php-src: restore freeing stuff and some small improvements: Zend/zend_strtod.c Zend/zend_strtod_int.h
| From: | Anatol Belski | Date: | Tue, 17 Mar 2015 21:11:27 +0000 |
| Subject: | com php-src: restore freeing stuff and some small improvements: Zend/zend_strtod.c Zend/zend_strtod_int.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-85561@lists.php.net to get a copy of this message | ||
Commit: a160a9097a8ed6484610542fe1bb6403789c3424
Author: Anatol Belski <ab@php.net> Tue, 17 Mar 2015 19:41:43 +0100
Parents: 5d4616e2b08f20ce6a582587cf9d3e34775a43a4
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a160a9097a8ed6484610542fe1bb6403789c3424
Log:
restore freeing stuff and some small improvements
Changed paths:
M Zend/zend_strtod.c
M Zend/zend_strtod_int.h
Diff:
diff --git a/Zend/zend_strtod.c b/Zend/zend_strtod.c
index 32ab5ae..545ed77 100644
--- a/Zend/zend_strtod.c
+++ b/Zend/zend_strtod.c
@@ -216,7 +216,6 @@
#define ULong uint32_t
#endif
-
#ifdef USE_LOCALE
#include "locale.h"
#endif
@@ -344,7 +343,7 @@ extern int strtod_diglim;
* An alternative that might be better on some machines is
* #define Storeinc(a,b,c) (*a++ = b << 16 | c & 0xffff)
*/
-#if defined(IEEE_8087) + defined(VAX)
+#if defined(IEEE_8087) + defined(VAX) + defined(__arm__)
#define Storeinc(a,b,c) (((unsigned short *)a)[1] = (unsigned short)b, \
((unsigned short *)a)[0] = (unsigned short)c, a++)
#else
@@ -4540,7 +4539,6 @@ ZEND_API double zend_bin_strtod(const char *str, const char **endptr)
static void destroy_freelist(void)
{
-#if 0
int i;
Bigint *tmp;
@@ -4554,7 +4552,6 @@ static void destroy_freelist(void)
freelist[i] = NULL;
}
FREE_DTOA_LOCK(0)
-#endif
}
#ifdef __cplusplus
diff --git a/Zend/zend_strtod_int.h b/Zend/zend_strtod_int.h
index 95a3e64..ba954cb 100644
--- a/Zend/zend_strtod_int.h
+++ b/Zend/zend_strtod_int.h
@@ -1,3 +1,9 @@
+
+/* TODO check to undef this option, this might
+ make more perf. destroy_freelist()
+ should be adapted then. */
+#define Omit_Private_Memory 1
+
#if defined(HAVE_INTTYPES_H)
#include <inttypes.h>
#elif defined(HAVE_STDINT_H)
@@ -25,9 +31,9 @@ typedef unsigned long int uint32_t;
#endif
#ifdef WORDS_BIGENDIAN
-#define IEEE_BIG_ENDIAN
+#define IEEE_BIG_ENDIAN 1
#else
-#define IEEE_LITTLE_ENDIAN
+#define IEEE_LITTLE_ENDIAN 1
#endif
#ifdef IEEE_LITTLE_ENDIAN
@@ -66,7 +72,6 @@ typedef unsigned long int uint32_t;
#if defined(_MSC_VER)
#define int32_t __int32
#define uint32_t unsigned __int32
-#define IEEE_LITTLE_ENDIAN
#endif
#ifdef ZTS
@@ -89,3 +94,4 @@ typedef unsigned long int uint32_t;
#endif
+