]> granicus.if.org Git - php/commitdiff
Drop HAVE_PACKED_OBJECT_VALUE
authorNikita Popov <nikic@php.net>
Tue, 6 Oct 2015 21:12:08 +0000 (23:12 +0200)
committerNikita Popov <nikic@php.net>
Tue, 6 Oct 2015 21:12:34 +0000 (23:12 +0200)
This check doesn't make sense anymore, we have no object_value
anymore.

ext/spl/config.m4
ext/spl/spl_observer.c

index 869e542ef4e762fe1c0e9f566cc153d579295e44..2f77946ce54fce4ab48c453cb377586e0d3abe87 100755 (executable)
@@ -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])
index 2796d3d93a4421013b6ec4ef97a1cbbd2fa0f016..b8d0281a871fc556f991736c5e8de77f52ef48c0 100644 (file)
@@ -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) /* {{{ */