summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2015-10-06 23:12:08 +0200
committerNikita Popov <nikic@php.net>2015-10-06 23:12:34 +0200
commitcd2b0a7bb89101bcb9cb31bbe232a540f6b6eadc (patch)
treed6d8b2c6bbcb8d2f78abe3c79e0a54935836b9e9
parent0a3c1fb4c2e8d02031c74da49d5a702cafbd3f0b (diff)
downloadphp-git-cd2b0a7bb89101bcb9cb31bbe232a540f6b6eadc.tar.gz
Drop HAVE_PACKED_OBJECT_VALUE
This check doesn't make sense anymore, we have no object_value anymore.
-rwxr-xr-xext/spl/config.m420
-rw-r--r--ext/spl/spl_observer.c40
2 files changed, 1 insertions, 59 deletions
diff --git a/ext/spl/config.m4 b/ext/spl/config.m4
index 869e542ef4..2f77946ce5 100755
--- a/ext/spl/config.m4
+++ b/ext/spl/config.m4
@@ -1,26 +1,6 @@
dnl $Id$
dnl config.m4 for extension SPL
- AC_MSG_CHECKING(whether zend_object_value is packed)
- old_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$INCLUDES -I$abs_srcdir $CPPFLAGS"
- AC_TRY_RUN([
-#include "Zend/zend_types.h"
-int main(int argc, char **argv) {
- return ((sizeof(zend_object_handle) + sizeof(zend_object_handlers*)) == sizeof(zend_object_value)) ? 0 : 1;
-}
- ], [
- ac_result=1
- AC_MSG_RESULT(yes)
- ],[
- ac_result=0
- AC_MSG_RESULT(no)
- ], [
- ac_result=0
- AC_MSG_RESULT(no)
- ])
- CPPFLAGS=$old_CPPFLAGS
- AC_DEFINE_UNQUOTED(HAVE_PACKED_OBJECT_VALUE, $ac_result, [Whether struct _zend_object_value is packed])
AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) support])
PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_exceptions.c spl_observer.c spl_dllist.c spl_heap.c spl_fixedarray.c, no,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
PHP_INSTALL_HEADERS([ext/spl], [php_spl.h spl_array.h spl_directory.h spl_engine.h spl_exceptions.h spl_functions.h spl_iterators.h spl_observer.h spl_dllist.h spl_heap.h spl_fixedarray.h])
diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c
index 2796d3d93a..b8d0281a87 100644
--- a/ext/spl/spl_observer.c
+++ b/ext/spl/spl_observer.c
@@ -90,7 +90,7 @@ typedef struct _spl_SplObjectStorage { /* {{{ */
zend_object std;
} spl_SplObjectStorage; /* }}} */
-/* {{{ storage is an assoc aray of [zend_object_value]=>[zval *obj, zval *inf] */
+/* {{{ storage is an assoc aray of [zend_object*]=>[zval *obj, zval *inf] */
typedef struct _spl_SplObjectStorageElement {
zval obj;
zval inf;
@@ -138,49 +138,11 @@ static zend_string *spl_object_storage_get_hash(spl_SplObjectStorage *intern, zv
memcpy(ZSTR_VAL(hash), (void*)&Z_OBJ_P(obj), sizeof(zend_object*));
ZSTR_VAL(hash)[ZSTR_LEN(hash)] = '\0';
return hash;
- /* !!! FIXME
- int hash_len = sizeof(zend_object_value);
-
-#if HAVE_PACKED_OBJECT_VALUE
-
- if (hash_len_ptr) {
- *hash_len_ptr = hash_len;
- }
-
- return (char*)&Z_OBJVAL_P(obj);
-#else
- char *hash = emalloc(hash_len + 1);
-
- zend_object_value zvalue;
- memset(&zvalue, 0, sizeof(zend_object_value));
- zvalue.handle = Z_OBJ_HANDLE_P(obj);
- zvalue.handlers = Z_OBJ_HT_P(obj);
-
- memcpy(hash, (char *)&zvalue, hash_len);
- hash[hash_len] = 0;
-
- if (hash_len_ptr) {
- *hash_len_ptr = hash_len;
- }
-
- return hash;
-#endif
-*/
- return NULL;
}
}
static void spl_object_storage_free_hash(spl_SplObjectStorage *intern, zend_string *hash) {
zend_string_release(hash);
-/*
- if (intern->fptr_get_hash) {
- } else {
-#if HAVE_PACKED_OBJECT_VALUE
-#else
- efree(hash);
-#endif
- }
-*/
}
static void spl_object_storage_dtor(zval *element) /* {{{ */