]> granicus.if.org Git - php/commitdiff
Use intptr_t for zend_intptr_t typedef
authorNikita Popov <nikic@php.net>
Thu, 16 Oct 2014 10:17:20 +0000 (12:17 +0200)
committerNikita Popov <nikic@php.net>
Thu, 16 Oct 2014 10:42:23 +0000 (12:42 +0200)
Current code doesn't work for 64bit zend_long with 32bit pointers.

If intptr_t isn't defined on some platform, we should add it to
our php_stdint.h header.

Zend/zend_types.h

index eb7154f2931bee623c9b17c7df5c32b4514672ca..383f77caa414fa5600c08606e24d4f0cd7f3456b 100644 (file)
@@ -64,14 +64,8 @@ typedef enum {
 # endif
 #endif
 
-/* XXX this won't work on X32 platform */
-#ifdef ZEND_ENABLE_ZVAL_LONG64
-typedef int64_t zend_intptr_t;
-typedef uint64_t zend_uintptr_t;
-#else
-typedef int32_t zend_intptr_t;
-typedef uint32_t zend_uintptr_t;
-#endif
+typedef intptr_t zend_intptr_t;
+typedef uintptr_t zend_uintptr_t;
 
 typedef struct _zend_object_handlers zend_object_handlers;
 typedef struct _zend_class_entry     zend_class_entry;