Permalink
Browse files

- Fixing Mac OS X support

- Fixing infinite loop with foreach() on Windows
  • Loading branch information...
1 parent ba42d66 commit 9018583b82cde37d7c9c93d8bf1ce6a3d823daa2 @orieg committed Sep 24, 2010
Showing with 18 additions and 11 deletions.
  1. +1 −0 judy_handlers.c
  2. +3 −3 judy_handlers.h
  3. +2 −0 judy_iterator.c
  4. +4 −2 package.xml
  5. +7 −2 php_judy.c
  6. +1 −4 php_judy.h
View
@@ -16,6 +16,7 @@
+----------------------------------------------------------------------+
*/
+#include "php_judy.h"
#include "judy_handlers.h"
/* {{{ judy_object_count
View
@@ -19,9 +19,9 @@
#ifndef JUDY_HANDLERS_H
#define JUDY_HANDLERS_H
-#include "php_judy.h"
-
-zend_object_handlers judy_handlers;
+#include "php.h"
+#include "zend_exceptions.h"
+#include "zend_interfaces.h"
zend_object_value judy_object_clone(zval *this_ptr TSRMLS_DC);
int judy_object_count(zval *object, long *count TSRMLS_DC);
View
@@ -60,10 +60,12 @@ void judy_iterator_data_dtor(judy_iterator *it)
{
if (it->key) {
zval_ptr_dtor(&it->key);
+ it->key = NULL;
}
if (it->data) {
zval_ptr_dtor(&it->data);
+ it->data = NULL;
}
}
/* }}} */
View
@@ -13,7 +13,7 @@
<email>nicolas@brousse.info</email>
<active>yes</active>
</lead>
- <date>2010-09-22</date>
+ <date>2010-09-24</date>
<version>
<release>0.1.2</release>
<api>0.1.1</api>
@@ -24,7 +24,9 @@
</stability>
<license uri="http://www.php.net/license">PHP</license>
<notes>
-- Fixing examples and benchmark code
+- Update examples php code
+- Fix Mac OS X support
+- Fix infinite loop with foreach() on Windows
</notes>
<contents>
<dir name="/">
View
@@ -25,6 +25,13 @@
#include "judy_arrayaccess.h"
#include "judy_iterator.h"
+ZEND_DECLARE_MODULE_GLOBALS(judy)
+
+/* declare judy class entry */
+zend_class_entry *judy_ce;
+
+zend_object_handlers judy_handlers;
+
/* {{{ php_judy_init_globals
*/
static void php_judy_init_globals(zend_judy_globals *judy_globals)
@@ -78,8 +85,6 @@ zend_object_value judy_object_new(zend_class_entry *ce TSRMLS_DC)
}
/* }}} */
-zend_class_entry *judy_ce;
-
PHPAPI zend_class_entry *php_judy_ce(void)
{
return judy_ce;
View
@@ -92,9 +92,6 @@ static void judy_object_free_storage(void * TSRMLS_DC);
*/
#define PHP_JUDY_MAX_LENGTH 65536
-/* declare judy class entry */
-zend_class_entry *judy_ce;
-
zend_object_value judy_object_new(zend_class_entry *ce TSRMLS_DC);
zend_object_value judy_object_new_ex(zend_class_entry *ce, judy_object **ptr TSRMLS_DC);
@@ -108,7 +105,7 @@ ZEND_BEGIN_MODULE_GLOBALS(judy)
unsigned long counter;
ZEND_END_MODULE_GLOBALS(judy)
-ZEND_DECLARE_MODULE_GLOBALS(judy)
+ZEND_EXTERN_MODULE_GLOBALS(judy)
#ifdef ZTS
#define JUDY_G(v) TSRMG(judy_globals_id, zend_judy_globals *, v)

0 comments on commit 9018583

Please sign in to comment.