From 37c0b3cbdbb66b29ae8bc25c19561a400dddd502 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 21 Oct 2013 06:30:20 +0200 Subject: php-pecl-judy: rename --- Judy-svn.patch | 155 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 Judy-svn.patch (limited to 'Judy-svn.patch') diff --git a/Judy-svn.patch b/Judy-svn.patch new file mode 100644 index 0000000..cc675a8 --- /dev/null +++ b/Judy-svn.patch @@ -0,0 +1,155 @@ +--- pecl/judy/trunk/php_judy.c 2013/10/09 14:43:09 331752 ++++ pecl/judy/trunk/php_judy.c 2013/10/09 15:09:50 331753 +@@ -144,7 +144,7 @@ + long index = 0; + Word_t j_index; + Pvoid_t *PValue = NULL; +- zval *result; ++ zval *result = NULL; + zval string_key, *pstring_key = &string_key; + judy_object *intern = (judy_object *) zend_object_store_get_object(object TSRMLS_CC); + +@@ -603,7 +603,7 @@ + } else if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &type) == SUCCESS) { + JTYPE(jtype, type); + intern->counter = 0; +- intern->type = type; ++ intern->type = jtype; + intern->array = (Pvoid_t) NULL; + } + +@@ -615,7 +615,7 @@ + Free Judy array and any other references */ + PHP_METHOD(judy, __destruct) + { +- JUDY_METHOD_GET_OBJECT ++ zval *object = getThis(); + + /* calling the object's free() method */ + zend_call_method_with_0_params(&object, NULL, NULL, "free", NULL); +@@ -628,7 +628,7 @@ + { + JUDY_METHOD_GET_OBJECT + +- Word_t Rc_word; ++ Word_t Rc_word = 0; + Word_t index; + uint8_t kindex[PHP_JUDY_MAX_LENGTH]; + Word_t *PValue; +@@ -1019,7 +1019,7 @@ + PHP_METHOD(judy, firstEmpty) + { + Word_t index = 0; +- int Rc_int; ++ int Rc_int = 0; + + JUDY_METHOD_GET_OBJECT + +@@ -1051,7 +1051,7 @@ + PHP_METHOD(judy, lastEmpty) + { + Word_t index = -1; +- int Rc_int; ++ int Rc_int = 0; + + JUDY_METHOD_GET_OBJECT + +@@ -1083,7 +1083,7 @@ + PHP_METHOD(judy, nextEmpty) + { + Word_t index; +- int Rc_int; ++ int Rc_int = 0; + + JUDY_METHOD_GET_OBJECT + +@@ -1115,7 +1115,7 @@ + PHP_METHOD(judy, prevEmpty) + { + Word_t index; +- int Rc_int; ++ int Rc_int = 0; + + JUDY_METHOD_GET_OBJECT + +--- pecl/judy/trunk/judy_iterator.c 2013/10/09 15:20:22 331754 ++++ pecl/judy/trunk/judy_iterator.c 2013/10/09 17:14:16 331755 +@@ -151,6 +151,14 @@ + + /* {{{ judy_iterator_current_key + */ ++#if ZEND_MODULE_API_NO >= 20121212 ++void judy_iterator_current_key(zend_object_iterator *iterator, zval *key TSRMLS_DC) ++{ ++ judy_iterator *it = (judy_iterator*) iterator; ++ ++ ZVAL_ZVAL(key, it->key, 1, 0); ++ ++#else + int judy_iterator_current_key(zend_object_iterator *iterator, + char **str_key, uint *str_key_len, ulong *int_key TSRMLS_DC) + { +@@ -171,6 +179,7 @@ + *str_key_len = Z_STRLEN_P(it->key)+1; + + return HASH_KEY_IS_STRING; ++#endif + } + /* }}} */ + +--- pecl/judy/trunk/judy_iterator.h 2013/10/09 15:20:22 331754 ++++ pecl/judy/trunk/judy_iterator.h 2013/10/09 17:14:16 331755 +@@ -43,8 +43,12 @@ + void judy_iterator_dtor(zend_object_iterator *iterator TSRMLS_DC); + int judy_iterator_valid(zend_object_iterator *iterator TSRMLS_DC); + void judy_iterator_current_data(zend_object_iterator *iterator, zval ***data TSRMLS_DC); ++#if ZEND_MODULE_API_NO >= 20121212 ++void judy_iterator_current_key(zend_object_iterator *iterator, zval *key TSRMLS_DC); ++#else + int judy_iterator_current_key(zend_object_iterator *iterator, + char **str_key, uint *str_key_len, ulong *int_key TSRMLS_DC); ++#endif + void judy_iterator_move_forward(zend_object_iterator *iterator TSRMLS_DC); + void judy_iterator_rewind(zend_object_iterator *iterator TSRMLS_DC); + /* }}} */ +--- pecl/judy/trunk/php_judy.c 2013/10/09 19:10:22 331757 ++++ pecl/judy/trunk/php_judy.c 2013/10/10 02:24:32 331758 +@@ -94,7 +94,7 @@ + } + /* }}} */ + +-PHPAPI zend_class_entry *php_judy_ce(void) ++PHP_JUDY_API zend_class_entry *php_judy_ce(void) + { + return judy_ce; + } +--- pecl/judy/trunk/php_judy.h 2013/10/10 02:24:40 331759 ++++ pecl/judy/trunk/php_judy.h 2013/10/10 04:38:41 331760 +@@ -19,7 +19,7 @@ + #ifndef PHP_JUDY_H + #define PHP_JUDY_H + +-#define PHP_JUDY_VERSION "0.1.6" ++#define PHP_JUDY_VERSION "1.0.0" + #define PHP_JUDY_EXTNAME "judy" + + #include +--- pecl/judy/trunk/tests/001.phpt 2013/10/10 02:24:40 331759 ++++ pecl/judy/trunk/tests/001.phpt 2013/10/10 04:38:41 331760 +@@ -20,4 +20,4 @@ + ?> + --EXPECT-- + judy extension is available +-PHP Judy Version: 0.1.6 ++PHP Judy Version: 1.0.0 +--- pecl/judy/trunk/tests/github_issue2_003.phpt 2013/10/10 04:38:41 331760 ++++ pecl/judy/trunk/tests/github_issue2_003.phpt 2013/10/10 04:43:24 331761 +@@ -2,6 +2,8 @@ + Check for Judy ITERATOR using foreach() and INT_TO_MIXED + --SKIPIF-- + ++--INI-- ++date.timezone=UTC + --FILE-- +