Permalink
Browse files

Merge pull request #1 from alecmocatta/master

Updated to check and account for PHP API change
  • Loading branch information...
2 parents b6d37e4 + 540847e commit 5e7a985ad3b0edd969b09c0e7c09b1b510b7916f @andreiz committed Oct 7, 2012
Showing with 5 additions and 10 deletions.
  1. +0 −9 config.m4
  2. +1 −1 lookup3.c
  3. +4 −0 php_bloomy.c
View
@@ -9,15 +9,6 @@ if test "$PHP_BLOOMY" != "no"; then
export OLD_CPPFLAGS="$CPPFLAGS"
export CPPFLAGS="$CPPFLAGS $INCLUDES -DHAVE_BLOOMY"
- AC_MSG_CHECKING(PHP version)
- AC_TRY_COMPILE([#include <php_version.h>], [
-#if PHP_VERSION_ID < 50000
-#error this extension requires at least PHP version 4.0.0
-#endif
-],
-[AC_MSG_RESULT(ok)],
-[AC_MSG_ERROR([need at least PHP 5.0.0])])
-
export CPPFLAGS="$OLD_CPPFLAGS"
PHP_SUBST(BLOOMY_SHARED_LIBADD)
View
@@ -764,7 +764,7 @@ uint32_t hashbig( const void *key, size_t length, uint32_t initval)
}
-#ifdef SELF_TEST
+#if SELF_TEST
/* used for timings */
void driver1()
View
@@ -210,7 +210,11 @@ zend_object_value php_bloom_new(zend_class_entry *ce TSRMLS_DC)
obj = (php_bloom_t *) emalloc(sizeof(*obj));
memset(obj, 0, sizeof(*obj));
zend_object_std_init(&obj->zo, ce TSRMLS_CC);
+#if PHP_VERSION_ID < 50399
zend_hash_copy(obj->zo.properties, &ce->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
+#else
+ object_properties_init(&(obj->zo), ce);
+#endif
retval.handle = zend_objects_store_put(obj, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t)php_bloom_free_storage, NULL TSRMLS_CC);
retval.handlers = zend_get_std_object_handlers();

0 comments on commit 5e7a985

Please sign in to comment.