From 20baf5574a6d0c4c7f0105ba9d884e19090c6c2e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 18 Jan 2021 07:38:08 +0100 Subject: update to 0.8.2 drop patches merged upstream --- 17.patch | 32 - 22.patch | 857 ------------------------- 7c692b9880aa6a501b6627d923bbc8ed1da1465f.patch | 190 ------ PHPINFO | 2 +- REFLECTION | 2 +- php-pecl-parle.spec | 21 +- 6 files changed, 11 insertions(+), 1093 deletions(-) delete mode 100644 17.patch delete mode 100644 22.patch delete mode 100644 7c692b9880aa6a501b6627d923bbc8ed1da1465f.patch diff --git a/17.patch b/17.patch deleted file mode 100644 index d1ee9e9..0000000 --- a/17.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0ef52b050a7110b16e0e992bc4d89c3e0b99a7b0 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Fri, 23 Aug 2019 14:59:00 +0200 -Subject: [PATCH] fix Function ReflectionType::__toString() is deprecated is - 7.4 - ---- - tests/reflection_001.phpt | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/tests/reflection_001.phpt b/tests/reflection_001.phpt -index c38e9ec..34f2f68 100644 ---- a/tests/reflection_001.phpt -+++ b/tests/reflection_001.phpt -@@ -6,13 +6,13 @@ return type in arg info - getReturnType()); -+var_dump(PHP_VERSION_ID >= 70100 ? $r->getReturnType()->getName() : (string)$r->getReturnType()); - $r = new ReflectionMethod("Parle\\RLexer", "getToken"); --var_dump((string)$r->getReturnType()); -+var_dump(PHP_VERSION_ID >= 70100 ? $r->getReturnType()->getName() : (string)$r->getReturnType()); - $r = new ReflectionMethod("Parle\\Parser", "errorInfo"); --var_dump((string)$r->getReturnType()); -+var_dump(PHP_VERSION_ID >= 70100 ? $r->getReturnType()->getName() : (string)$r->getReturnType()); - $r = new ReflectionMethod("Parle\\RParser", "errorInfo"); --var_dump((string)$r->getReturnType()); -+var_dump(PHP_VERSION_ID >= 70100 ? $r->getReturnType()->getName() : (string)$r->getReturnType()); - - ?> - ==DONE== diff --git a/22.patch b/22.patch deleted file mode 100644 index 3bb0fa7..0000000 --- a/22.patch +++ /dev/null @@ -1,857 +0,0 @@ -From ddb2f1bcb9e3c268a278079b48291d328bac5a9f Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Fri, 15 Jan 2021 15:30:10 +0100 -Subject: [PATCH] fix PHP 8 compatibility - ---- - parle.cpp | 278 +++++++++++++++++++++++++++++++++++--- - tests/reflection_002.phpt | 10 +- - 2 files changed, 264 insertions(+), 24 deletions(-) - -diff --git a/parle.cpp b/parle.cpp -index 087de5e..b2b6819 100644 ---- a/parle.cpp -+++ b/parle.cpp -@@ -960,7 +960,7 @@ _parser_validate(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *par_ce, zend_cl - php_parle_rethrow_from_cpp(ParleParserException_ce, e.what(), 0); - } - -- RETURN_FALSE -+ RETURN_FALSE; - }/*}}}*/ - - /* {{{ public boolean Parser::validate(void) */ -@@ -1432,6 +1432,15 @@ ZEND_END_ARG_INFO(); - ZEND_BEGIN_ARG_INFO_EX(arginfo_parle_lexer_build, 0, 0, 0) - ZEND_END_ARG_INFO(); - -+ZEND_BEGIN_ARG_INFO_EX(arginfo_parle_lexer_push, 0, 0, 0) -+ ZEND_ARG_VARIADIC_INFO(0, args) -+ZEND_END_ARG_INFO(); -+ -+ZEND_BEGIN_ARG_INFO_EX(arginfo_parle_lexer_insertmacro, 0, 0, 2) -+ ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) -+ ZEND_ARG_TYPE_INFO(0, reg, IS_STRING, 0) -+ZEND_END_ARG_INFO(); -+ - ZEND_BEGIN_ARG_INFO_EX(arginfo_parle_lexer_consume, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) - ZEND_END_ARG_INFO(); -@@ -1558,27 +1567,27 @@ const zend_function_entry ParleToken_methods[] = { - }; - - const zend_function_entry ParleLexer_methods[] = { -- PHP_ME(ParleLexer, push, NULL, ZEND_ACC_PUBLIC) -+ PHP_ME(ParleLexer, push, arginfo_parle_lexer_push, ZEND_ACC_PUBLIC) - PHP_ME(ParleLexer, getToken, arginfo_parle_lexer_gettoken, ZEND_ACC_PUBLIC) - PHP_ME(ParleLexer, build, arginfo_parle_lexer_build, ZEND_ACC_PUBLIC) - PHP_ME(ParleLexer, consume, arginfo_parle_lexer_consume, ZEND_ACC_PUBLIC) - PHP_ME(ParleLexer, advance, arginfo_parle_lexer_advance, ZEND_ACC_PUBLIC) - PHP_ME(ParleLexer, reset, arginfo_parle_lexer_reset, ZEND_ACC_PUBLIC) -- PHP_ME(ParleLexer, insertMacro, NULL, ZEND_ACC_PUBLIC) -+ PHP_ME(ParleLexer, insertMacro, arginfo_parle_lexer_insertmacro, ZEND_ACC_PUBLIC) - PHP_ME(ParleLexer, dump, arginfo_parle_lexer_dump, ZEND_ACC_PUBLIC) - PHP_ME(ParleLexer, callout, arginfo_parle_lexer_callout, ZEND_ACC_PUBLIC) - PHP_FE_END - }; - - const zend_function_entry ParleRLexer_methods[] = { -- PHP_ME(ParleRLexer, push, NULL, ZEND_ACC_PUBLIC) -+ PHP_ME(ParleRLexer, push, arginfo_parle_lexer_push, ZEND_ACC_PUBLIC) - PHP_ME(ParleRLexer, getToken, arginfo_parle_lexer_gettoken, ZEND_ACC_PUBLIC) - PHP_ME(ParleRLexer, build, arginfo_parle_lexer_build, ZEND_ACC_PUBLIC) - PHP_ME(ParleRLexer, consume, arginfo_parle_lexer_consume, ZEND_ACC_PUBLIC) - PHP_ME(ParleRLexer, advance, arginfo_parle_lexer_advance, ZEND_ACC_PUBLIC) - PHP_ME(ParleRLexer, reset, arginfo_parle_lexer_reset, ZEND_ACC_PUBLIC) - PHP_ME(ParleRLexer, pushState, arginfo_parle_lexer_pushstate, ZEND_ACC_PUBLIC) -- PHP_ME(ParleRLexer, insertMacro, NULL, ZEND_ACC_PUBLIC) -+ PHP_ME(ParleRLexer, insertMacro, arginfo_parle_lexer_insertmacro, ZEND_ACC_PUBLIC) - PHP_ME(ParleRLexer, dump, arginfo_parle_lexer_dump, ZEND_ACC_PUBLIC) - PHP_ME(ParleRLexer, callout, arginfo_parle_lexer_callout, ZEND_ACC_PUBLIC) - PHP_FE_END -@@ -1632,6 +1641,8 @@ const zend_function_entry ParleStack_methods[] = { - /* }}} */ - - /* {{{ Prop handler macros */ -+#if PHP_VERSION_ID < 80000 -+ - #define PARLE_IS_PROP(name) (zend_binary_strcmp(name, sizeof(name) - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0) - #define PARLE_CHECK_THROW_RO_PROP_EX(ex_ce, prop, action) \ - if (PARLE_IS_PROP(prop)) { \ -@@ -1641,6 +1652,17 @@ const zend_function_entry ParleStack_methods[] = { - } \ - action; \ - } -+#else -+ -+#define PARLE_IS_PROP(name) (zend_binary_strcmp(name, sizeof(name) - 1, ZSTR_VAL(member), ZSTR_LEN(member)) == 0) -+#define PARLE_CHECK_THROW_RO_PROP_EX(ex_ce, prop, action) \ -+ if (PARLE_IS_PROP(prop)) { \ -+ zend_throw_exception_ex(ex_ce, 0, "Cannot set readonly property $%s of class %s", prop, ZSTR_VAL(object->ce->name)); \ -+ action; \ -+ } -+ -+#endif -+ - #define PARLE_LEX_CHECK_THROW_RET_RO_PROP(prop) PARLE_CHECK_THROW_RO_PROP_EX(ParleLexerException_ce, prop, return &EG(uninitialized_zval)) - #define PARLE_LEX_CHECK_THROW_RO_PROP(prop) PARLE_CHECK_THROW_RO_PROP_EX(ParleLexerException_ce, prop, return) - #define PARLE_PAR_CHECK_THROW_RET_RO_PROP(prop) PARLE_CHECK_THROW_RO_PROP_EX(ParleParserException_ce, prop, return &EG(uninitialized_zval)) -@@ -1709,6 +1731,7 @@ php_parle_lexer_object_init(zend_class_entry *ce) noexcept - }/*}}}*/ - - template zval * -+#if PHP_VERSION_ID < 80000 - php_parle_lex_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv) noexcept - {/*{{{*/ - lexer_obj_type *zplo; -@@ -1722,6 +1745,16 @@ php_parle_lex_read_property(zval *object, zval *member, int type, void **cache_s - cache_slot = NULL; - } - -+ zplo = _php_parle_lexer_fetch_zobj(Z_OBJ_P(object)); -+#else -+php_parle_lex_read_property(zend_object *object, zend_string *member, int type, void **cache_slot, zval *rv) noexcept -+{/*{{{*/ -+ lexer_obj_type *zplo; -+ zval *retval = NULL; -+ -+ zplo = _php_parle_lexer_fetch_zobj(object); -+#endif -+ - if (type != BP_VAR_R && type != BP_VAR_IS) { - PARLE_LEX_CHECK_THROW_RET_RO_PROP("state") - PARLE_LEX_CHECK_THROW_RET_RO_PROP("marker") -@@ -1730,8 +1763,6 @@ php_parle_lex_read_property(zval *object, zval *member, int type, void **cache_s - PARLE_LEX_CHECK_THROW_RET_RO_PROP("column") - } - -- zplo = _php_parle_lexer_fetch_zobj(Z_OBJ_P(object)); -- - auto &lex = *zplo->lex; - retval = rv; - if (PARLE_IS_PROP("bol")) { -@@ -1752,21 +1783,31 @@ php_parle_lex_read_property(zval *object, zval *member, int type, void **cache_s - retval = (zend_get_std_object_handlers())->read_property(object, member, type, cache_slot, rv); - } - -+#if PHP_VERSION_ID < 80000 - if (member == &tmp_member) { - zval_dtor(member); - } -+#endif - - return retval; - }/*}}}*/ - - static zval * -+#if PHP_VERSION_ID < 80000 - php_parle_lexer_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv) noexcept -+#else -+php_parle_lexer_read_property(zend_object *object, zend_string *member, int type, void **cache_slot, zval *rv) noexcept -+#endif - {/*{{{*/ - return php_parle_lex_read_property(object, member, type, cache_slot, rv); - }/*}}}*/ - - static zval * -+#if PHP_VERSION_ID < 80000 - php_parle_rlexer_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv) noexcept -+#else -+php_parle_rlexer_read_property(zend_object *object, zend_string *member, int type, void **cache_slot, zval *rv) noexcept -+#endif - {/*{{{*/ - return php_parle_lex_read_property(object, member, type, cache_slot, rv); - }/*}}}*/ -@@ -1777,6 +1818,7 @@ zval * - #else - void - #endif -+#if PHP_VERSION_ID < 80000 - php_parle_lex_write_property(zval *object, zval *member, zval *value, void **cache_slot) noexcept - {/*{{{*/ - lexer_obj_type *zplo; -@@ -1790,12 +1832,21 @@ php_parle_lex_write_property(zval *object, zval *member, zval *value, void **cac - } - - zplo = _php_parle_lexer_fetch_zobj(Z_OBJ_P(object)); -+#else -+php_parle_lex_write_property(zend_object *object, zend_string *member, zval *value, void **cache_slot) noexcept -+{/*{{{*/ -+ lexer_obj_type *zplo = _php_parle_lexer_fetch_zobj(object); -+#endif - - auto &lex = *zplo->lex; - if (PARLE_IS_PROP("bol")) { - if (lex.par) { - /* Iterator has it const. */ -+#if PHP_VERSION_ID < 80000 - zend_throw_exception_ex(ParleLexerException_ce, 0, "Cannot set readonly property $bol of class %s", ZSTR_VAL(Z_OBJ_P(object)->ce->name)); -+#else -+ zend_throw_exception_ex(ParleLexerException_ce, 0, "Cannot set readonly property $bol of class %s", ZSTR_VAL(object->ce->name)); -+#endif - } else { - lex.iter.set_bol(static_cast(zval_is_true(value) == 1)); - } -@@ -1819,9 +1870,11 @@ php_parle_lex_write_property(zval *object, zval *member, zval *value, void **cac - (zend_get_std_object_handlers())->write_property(object, member, value, cache_slot); - } - -+#if PHP_VERSION_ID < 80000 - if (member == &tmp_member) { - zval_dtor(member); - } -+#endif - - #if PHP_VERSION_ID >= 70400 - return value; -@@ -1833,7 +1886,11 @@ static zval * - #else - static void - #endif -+#if PHP_VERSION_ID < 80000 - php_parle_lexer_write_property(zval *object, zval *member, zval *value, void **cache_slot) noexcept -+#else -+php_parle_lexer_write_property(zend_object *object, zend_string *member, zval *value, void **cache_slot) noexcept -+#endif - {/*{{{*/ - #if PHP_VERSION_ID >= 70400 - return -@@ -1846,7 +1903,11 @@ static zval * - #else - static void - #endif -+#if PHP_VERSION_ID < 80000 - php_parle_rlexer_write_property(zval *object, zval *member, zval *value, void **cache_slot) noexcept -+#else -+php_parle_rlexer_write_property(zend_object *object, zend_string *member, zval *value, void **cache_slot) noexcept -+#endif - {/*{{{*/ - #if PHP_VERSION_ID >= 70400 - return -@@ -1855,14 +1916,19 @@ php_parle_rlexer_write_property(zval *object, zval *member, zval *value, void ** - }/*}}}*/ - - template HashTable * -+#if PHP_VERSION_ID < 80000 - php_parle_lex_get_properties(zval *object) noexcept - {/*{{{*/ -- lexer_obj_type *zplo; -+ lexer_obj_type *zplo = _php_parle_lexer_fetch_zobj(Z_OBJ_P(object)); -+#else -+php_parle_lex_get_properties(zend_object *object) noexcept -+{/*{{{*/ -+ lexer_obj_type *zplo = _php_parle_lexer_fetch_zobj(object); -+#endif - HashTable *props; - zval zv; - - props = zend_std_get_properties(object); -- zplo = _php_parle_lexer_fetch_zobj(Z_OBJ_P(object)); - - auto &lex = *zplo->lex; - ZVAL_LONG(&zv, lex.rules.flags()); -@@ -1884,18 +1950,27 @@ php_parle_lex_get_properties(zval *object) noexcept - }/*}}}*/ - - static HashTable * -+#if PHP_VERSION_ID < 80000 - php_parle_lexer_get_properties(zval *object) noexcept -+#else -+php_parle_lexer_get_properties(zend_object *object) noexcept -+#endif - {/*{{{*/ - return php_parle_lex_get_properties(object); - }/*}}}*/ - - static HashTable * -+#if PHP_VERSION_ID < 80000 - php_parle_rlexer_get_properties(zval *object) noexcept -+#else -+php_parle_rlexer_get_properties(zend_object *object) noexcept -+#endif - {/*{{{*/ - return php_parle_lex_get_properties(object); - }/*}}}*/ - - template static int -+#if PHP_VERSION_ID < 80000 - php_parle_lex_has_property(zval *object, zval *member, int type, void **cache_slot) noexcept - {/*{{{*/ - zval tmp_member, rv, *prop; -@@ -1907,6 +1982,12 @@ php_parle_lex_has_property(zval *object, zval *member, int type, void **cache_sl - member = &tmp_member; - cache_slot = NULL; - } -+#else -+php_parle_lex_has_property(zend_object *object, zend_string *member, int type, void **cache_slot) noexcept -+{/*{{{*/ -+ zval rv, *prop; -+ int retval = 0; -+#endif - - prop = php_parle_lex_read_property(object, member, BP_VAR_IS, cache_slot, &rv); - -@@ -1922,27 +2003,41 @@ php_parle_lex_has_property(zval *object, zval *member, int type, void **cache_sl - retval = (zend_get_std_object_handlers())->has_property(object, member, type, cache_slot); - } - -+#if PHP_VERSION_ID < 80000 - if (member == &tmp_member) { - zval_dtor(member); - } -+#endif - - return retval; - }/*}}}*/ - - static int -+#if PHP_VERSION_ID < 80000 - php_parle_lexer_has_property(zval *object, zval *member, int type, void **cache_slot) noexcept -+#else -+php_parle_lexer_has_property(zend_object *object, zend_string *member, int type, void **cache_slot) noexcept -+#endif - {/*{{{*/ - return php_parle_lex_has_property(object, member, type, cache_slot); - }/*}}}*/ - - static int -+#if PHP_VERSION_ID < 80000 - php_parle_rlexer_has_property(zval *object, zval *member, int type, void **cache_slot) noexcept -+#else -+php_parle_rlexer_has_property(zend_object *object, zend_string *member, int type, void **cache_slot) noexcept -+#endif - {/*{{{*/ - return php_parle_lex_has_property(object, member, type, cache_slot); - }/*}}}*/ - - static HashTable * -+#if PHP_VERSION_ID < 80000 - php_parle_lex_get_gc(zval *object, zval **gc_data, int *gc_data_count) noexcept -+#else -+php_parle_lex_get_gc(zend_object *object, zval **gc_data, int *gc_data_count) noexcept -+#endif - {/*{{{*/ - *gc_data = NULL; - *gc_data_count = 0; -@@ -1950,6 +2045,7 @@ php_parle_lex_get_gc(zval *object, zval **gc_data, int *gc_data_count) noexcept - }/*}}}*/ - - template static zval * -+#if PHP_VERSION_ID < 80000 - php_parle_lex_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot) noexcept - {/*{{{*/ - zval tmp_member, *prop; -@@ -1960,6 +2056,11 @@ php_parle_lex_get_property_ptr_ptr(zval *object, zval *member, int type, void ** - member = &tmp_member; - cache_slot = NULL; - } -+#else -+php_parle_lex_get_property_ptr_ptr(zend_object *object, zend_string *member, int type, void **cache_slot) noexcept -+{/*{{{*/ -+ zval *prop; -+#endif - - if (PARLE_IS_PROP("state") || PARLE_IS_PROP("marker") || PARLE_IS_PROP("cursor") || PARLE_IS_PROP("bol") || PARLE_IS_PROP("flags") || PARLE_IS_PROP("line") || PARLE_IS_PROP("column")) { - /* Fallback to read_property. */ -@@ -1968,21 +2069,30 @@ php_parle_lex_get_property_ptr_ptr(zval *object, zval *member, int type, void ** - - prop = (zend_get_std_object_handlers())->get_property_ptr_ptr(object, member, type, cache_slot); - -+#if PHP_VERSION_ID < 80000 - if (member == &tmp_member) { - zval_dtor(member); - } -- -+#endif - return prop; - }/*}}}*/ - - static zval * -+#if PHP_VERSION_ID < 80000 - php_parle_lexer_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot) noexcept -+#else -+php_parle_lexer_get_property_ptr_ptr(zend_object *object, zend_string *member, int type, void **cache_slot) noexcept -+#endif - {/*{{{*/ - return php_parle_lex_get_property_ptr_ptr(object, member, type, cache_slot); - }/*}}}*/ - - static zval * -+#if PHP_VERSION_ID < 80000 - php_parle_rlexer_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot) noexcept -+#else -+php_parle_rlexer_get_property_ptr_ptr(zend_object *object, zend_string *member, int type, void **cache_slot) noexcept -+#endif - {/*{{{*/ - return php_parle_lex_get_property_ptr_ptr(object, member, type, cache_slot); - }/*}}}*/ -@@ -2039,6 +2149,7 @@ php_parle_rparser_object_init(zend_class_entry *ce) noexcept - }/*}}}*/ - - template static zval * -+#if PHP_VERSION_ID < 80000 - php_parle_par_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv) noexcept - {/*{{{*/ - parser_obj_type *zppo; -@@ -2052,13 +2163,21 @@ php_parle_par_read_property(zval *object, zval *member, int type, void **cache_s - cache_slot = NULL; - } - -+ zppo = _php_parle_parser_fetch_zobj(Z_OBJ_P(object)); -+#else -+php_parle_par_read_property(zend_object *object, zend_string *member, int type, void **cache_slot, zval *rv) noexcept -+{/*{{{*/ -+ parser_obj_type *zppo; -+ zval *retval = NULL; -+ -+ zppo = _php_parle_parser_fetch_zobj(object); -+#endif -+ - if (type != BP_VAR_R && type != BP_VAR_IS) { - PARLE_PAR_CHECK_THROW_RET_RO_PROP("action") - PARLE_PAR_CHECK_THROW_RET_RO_PROP("reduceId") - } - -- zppo = _php_parle_parser_fetch_zobj(Z_OBJ_P(object)); -- - auto &par = *zppo->par; - - retval = rv; -@@ -2074,21 +2193,31 @@ php_parle_par_read_property(zval *object, zval *member, int type, void **cache_s - retval = (zend_get_std_object_handlers())->read_property(object, member, type, cache_slot, rv); - } - -+#if PHP_VERSION_ID < 80000 - if (member == &tmp_member) { - zval_dtor(member); - } -+#endif - - return retval; - }/*}}}*/ - - static zval * -+#if PHP_VERSION_ID < 80000 - php_parle_parser_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv) noexcept -+#else -+php_parle_parser_read_property(zend_object *object, zend_string *member, int type, void **cache_slot, zval *rv) noexcept -+#endif - {/*{{{*/ - return php_parle_par_read_property(object, member, type, cache_slot, rv); - }/*}}}*/ - - static zval * -+#if PHP_VERSION_ID < 80000 - php_parle_rparser_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv) noexcept -+#else -+php_parle_rparser_read_property(zend_object *object, zend_string *member, int type, void **cache_slot, zval *rv) noexcept -+#endif - {/*{{{*/ - return php_parle_par_read_property(object, member, type, cache_slot, rv); - }/*}}}*/ -@@ -2099,6 +2228,7 @@ zval * - #else - void - #endif -+#if PHP_VERSION_ID < 80000 - php_parle_par_write_property(zval *object, zval *member, zval *value, void **cache_slot) noexcept - {/*{{{*/ - zval tmp_member; -@@ -2109,6 +2239,10 @@ php_parle_par_write_property(zval *object, zval *member, zval *value, void **cac - member = &tmp_member; - cache_slot = NULL; - } -+#else -+php_parle_par_write_property(zend_object *object, zend_string *member, zval *value, void **cache_slot) noexcept -+{/*{{{*/ -+#endif - - #if PHP_VERSION_ID >= 70400 - PARLE_PAR_CHECK_THROW_RET_RO_PROP("action") -@@ -2121,10 +2255,11 @@ php_parle_par_write_property(zval *object, zval *member, zval *value, void **cac - (zend_get_std_object_handlers())->write_property(object, member, value, cache_slot); - } - -+#if PHP_VERSION_ID < 80000 - if (member == &tmp_member) { - zval_dtor(member); - } -- -+#endif - #if PHP_VERSION_ID >= 70400 - return value; - #endif -@@ -2135,7 +2270,11 @@ static zval * - #else - static void - #endif -+#if PHP_VERSION_ID < 80000 - php_parle_parser_write_property(zval *object, zval *member, zval *value, void **cache_slot) noexcept -+#else -+php_parle_parser_write_property(zend_object *object, zend_string *member, zval *value, void **cache_slot) noexcept -+#endif - {/*{{{*/ - #if PHP_VERSION_ID >= 70400 - return -@@ -2148,7 +2287,11 @@ static zval * - #else - static void - #endif -+#if PHP_VERSION_ID < 80000 - php_parle_rparser_write_property(zval *object, zval *member, zval *value, void **cache_slot) noexcept -+#else -+php_parle_rparser_write_property(zend_object *object, zend_string *member, zval *value, void **cache_slot) noexcept -+#endif - {/*{{{*/ - #if PHP_VERSION_ID >= 70400 - return -@@ -2157,14 +2300,19 @@ php_parle_rparser_write_property(zval *object, zval *member, zval *value, void * - }/*}}}*/ - - template HashTable * -+#if PHP_VERSION_ID < 80000 - php_parle_par_get_properties(zval *object) noexcept - {/*{{{*/ -- parser_obj_type *zppo; -+ parser_obj_type *zppo = _php_parle_parser_fetch_zobj(Z_OBJ_P(object)); -+#else -+php_parle_par_get_properties(zend_object *object) noexcept -+{/*{{{*/ -+ parser_obj_type *zppo = _php_parle_parser_fetch_zobj(object); -+#endif - HashTable *props; - zval zv; - - props = zend_std_get_properties(object); -- zppo = _php_parle_parser_fetch_zobj(Z_OBJ_P(object)); - - auto &par = *zppo->par; - -@@ -2181,18 +2329,27 @@ php_parle_par_get_properties(zval *object) noexcept - }/*}}}*//*}}}*/ - - static HashTable * -+#if PHP_VERSION_ID < 80000 - php_parle_parser_get_properties(zval *object) noexcept -+#else -+php_parle_parser_get_properties(zend_object *object) noexcept -+#endif - {/*{{{*/ - return php_parle_par_get_properties(object); - }/*}}}*/ - - static HashTable * -+#if PHP_VERSION_ID < 80000 - php_parle_rparser_get_properties(zval *object) noexcept -+#else -+php_parle_rparser_get_properties(zend_object *object) noexcept -+#endif - {/*{{{*/ - return php_parle_par_get_properties(object); - }/*}}}*/ - - template static int -+#if PHP_VERSION_ID < 80000 - php_parle_par_has_property(zval *object, zval *member, int type, void **cache_slot) noexcept - {/*{{{*/ - zval tmp_member, rv, *prop; -@@ -2204,6 +2361,12 @@ php_parle_par_has_property(zval *object, zval *member, int type, void **cache_sl - member = &tmp_member; - cache_slot = NULL; - } -+#else -+php_parle_par_has_property(zend_object *object, zend_string *member, int type, void **cache_slot) noexcept -+{/*{{{*/ -+ zval rv, *prop; -+ int retval = 0; -+#endif - - prop = php_parle_par_read_property(object, member, BP_VAR_IS, cache_slot, &rv); - -@@ -2219,27 +2382,41 @@ php_parle_par_has_property(zval *object, zval *member, int type, void **cache_sl - retval = (zend_get_std_object_handlers())->has_property(object, member, type, cache_slot); - } - -+#if PHP_VERSION_ID < 80000 - if (member == &tmp_member) { - zval_dtor(member); - } -+#endif - - return retval; - }/*}}}*/ - - static int -+#if PHP_VERSION_ID < 80000 - php_parle_parser_has_property(zval *object, zval *member, int type, void **cache_slot) noexcept -+#else -+php_parle_parser_has_property(zend_object *object, zend_string *member, int type, void **cache_slot) noexcept -+#endif - {/*{{{*/ - return php_parle_par_has_property(object, member, type, cache_slot); - }/*}}}*/ - - static int -+#if PHP_VERSION_ID < 80000 - php_parle_rparser_has_property(zval *object, zval *member, int type, void **cache_slot) noexcept -+#else -+php_parle_rparser_has_property(zend_object *object, zend_string *member, int type, void **cache_slot) noexcept -+#endif - {/*{{{*/ - return php_parle_par_has_property(object, member, type, cache_slot); - }/*}}}*/ - - static HashTable * -+#if PHP_VERSION_ID < 80000 - php_parle_par_get_gc(zval *object, zval **gc_data, int *gc_data_count) noexcept -+#else -+php_parle_par_get_gc(zend_object *object, zval **gc_data, int *gc_data_count) noexcept -+#endif - {/*{{{*/ - *gc_data = NULL; - *gc_data_count = 0; -@@ -2247,6 +2424,7 @@ php_parle_par_get_gc(zval *object, zval **gc_data, int *gc_data_count) noexcept - }/*}}}*/ - - template static zval * -+#if PHP_VERSION_ID < 80000 - php_parle_par_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot) noexcept - {/*{{{*/ - zval tmp_member, *prop; -@@ -2257,6 +2435,11 @@ php_parle_par_get_property_ptr_ptr(zval *object, zval *member, int type, void ** - member = &tmp_member; - cache_slot = NULL; - } -+#else -+php_parle_par_get_property_ptr_ptr(zend_object *object, zend_string *member, int type, void **cache_slot) noexcept -+{/*{{{*/ -+ zval *prop; -+#endif - - if (PARLE_IS_PROP("action") || PARLE_IS_PROP("reduceId")) { - /* Fallback to read_property. */ -@@ -2265,21 +2448,31 @@ php_parle_par_get_property_ptr_ptr(zval *object, zval *member, int type, void ** - - prop = (zend_get_std_object_handlers())->get_property_ptr_ptr(object, member, type, cache_slot); - -+#if PHP_VERSION_ID < 80000 - if (member == &tmp_member) { - zval_dtor(member); - } -+#endif - - return prop; - }/*}}}*/ - - static zval * -+#if PHP_VERSION_ID < 80000 - php_parle_parser_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot) noexcept -+#else -+php_parle_parser_get_property_ptr_ptr(zend_object *object, zend_string *member, int type, void **cache_slot) noexcept -+#endif - {/*{{{*/ - return php_parle_par_get_property_ptr_ptr(object, member, type, cache_slot); - }/*}}}*/ - - static zval * -+#if PHP_VERSION_ID < 80000 - php_parle_rparser_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot) noexcept -+#else -+php_parle_rparser_get_property_ptr_ptr(zend_object *object, zend_string *member, int type, void **cache_slot) noexcept -+#endif - {/*{{{*/ - return php_parle_par_get_property_ptr_ptr(object, member, type, cache_slot); - }/*}}}*/ -@@ -2321,6 +2514,7 @@ php_parle_stack_object_init(zend_class_entry *ce) noexcept - }/*}}}*/ - - static zval * -+#if PHP_VERSION_ID < 80000 - php_parle_stack_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv) noexcept - {/*{{{*/ - ze_parle_stack_obj *zpso; -@@ -2334,13 +2528,21 @@ php_parle_stack_read_property(zval *object, zval *member, int type, void **cache - cache_slot = NULL; - } - -+ zpso = php_parle_stack_fetch_obj(Z_OBJ_P(object)); -+#else -+php_parle_stack_read_property(zend_object *object, zend_string *member, int type, void **cache_slot, zval *rv) noexcept -+{/*{{{*/ -+ ze_parle_stack_obj *zpso; -+ zval *retval = NULL; -+ -+ zpso = php_parle_stack_fetch_obj(object); -+#endif -+ - if (type != BP_VAR_R && type != BP_VAR_IS) { - PARLE_STACK_CHECK_THROW_RET_RO_PROP("empty") - PARLE_STACK_CHECK_THROW_RET_RO_PROP("size") - } - -- zpso = php_parle_stack_fetch_obj(Z_OBJ_P(object)); -- - retval = rv; - if (PARLE_IS_PROP("top")) { - if (zpso->stack->empty()) { -@@ -2356,9 +2558,11 @@ php_parle_stack_read_property(zval *object, zval *member, int type, void **cache - retval = (zend_get_std_object_handlers())->read_property(object, member, type, cache_slot, rv); - } - -+#if PHP_VERSION_ID < 80000 - if (member == &tmp_member) { - zval_dtor(member); - } -+#endif - - return retval; - }/*}}}*/ -@@ -2368,6 +2572,7 @@ static zval * - #else - static void - #endif -+#if PHP_VERSION_ID < 80000 - php_parle_stack_write_property(zval *object, zval *member, zval *value, void **cache_slot) noexcept - {/*{{{*/ - ze_parle_stack_obj *zpso; -@@ -2381,6 +2586,13 @@ php_parle_stack_write_property(zval *object, zval *member, zval *value, void **c - } - - zpso = php_parle_stack_fetch_obj(Z_OBJ_P(object)); -+#else -+php_parle_stack_write_property(zend_object *object, zend_string *member, zval *value, void **cache_slot) noexcept -+{/*{{{*/ -+ ze_parle_stack_obj *zpso; -+ -+ zpso = php_parle_stack_fetch_obj(object); -+#endif - - if (PARLE_IS_PROP("top")) { - if (zpso->stack->empty()) { -@@ -2412,23 +2624,30 @@ php_parle_stack_write_property(zval *object, zval *member, zval *value, void **c - (zend_get_std_object_handlers())->write_property(object, member, value, cache_slot); - } - -+#if PHP_VERSION_ID < 80000 - if (member == &tmp_member) { - zval_dtor(member); - } -+#endif - #if PHP_VERSION_ID >= 70400 - return value; - #endif - }/*}}}*/ - - static HashTable * -+#if PHP_VERSION_ID < 80000 - php_parle_stack_get_properties(zval *object) noexcept - {/*{{{*/ -- ze_parle_stack_obj *zpso; -+ ze_parle_stack_obj *zpso = php_parle_stack_fetch_obj(Z_OBJ_P(object)); -+#else -+php_parle_stack_get_properties(zend_object *object) noexcept -+{/*{{{*/ -+ ze_parle_stack_obj *zpso = php_parle_stack_fetch_obj(object); -+#endif - HashTable *props; - zval zv; - - props = zend_std_get_properties(object); -- zpso = php_parle_stack_fetch_obj(Z_OBJ_P(object)); - - ZVAL_BOOL(&zv, zpso->stack->empty()); - zend_hash_str_update(props, "empty", sizeof("empty")-1, &zv); -@@ -2451,6 +2670,7 @@ php_parle_stack_get_properties(zval *object) noexcept - }/*}}}*/ - - static int -+#if PHP_VERSION_ID < 80000 - php_parle_stack_has_property(zval *object, zval *member, int type, void **cache_slot) noexcept - {/*{{{*/ - zval tmp_member, rv, *prop; -@@ -2462,6 +2682,12 @@ php_parle_stack_has_property(zval *object, zval *member, int type, void **cache_ - member = &tmp_member; - cache_slot = NULL; - } -+#else -+php_parle_stack_has_property(zend_object *object, zend_string *member, int type, void **cache_slot) noexcept -+{/*{{{*/ -+ zval rv, *prop; -+ int retval = 0; -+#endif - - prop = php_parle_stack_read_property(object, member, BP_VAR_IS, cache_slot, &rv); - -@@ -2477,15 +2703,21 @@ php_parle_stack_has_property(zval *object, zval *member, int type, void **cache_ - retval = (zend_get_std_object_handlers())->has_property(object, member, type, cache_slot); - } - -+#if PHP_VERSION_ID < 80000 - if (member == &tmp_member) { - zval_dtor(member); - } -+#endif - - return retval; - }/*}}}*/ - - static HashTable * -+#if PHP_VERSION_ID < 80000 - php_parle_stack_get_gc(zval *object, zval **gc_data, int *gc_data_count) noexcept -+#else -+php_parle_stack_get_gc(zend_object *object, zval **gc_data, int *gc_data_count) noexcept -+#endif - {/*{{{*/ - *gc_data = NULL; - *gc_data_count = 0; -@@ -2493,6 +2725,7 @@ php_parle_stack_get_gc(zval *object, zval **gc_data, int *gc_data_count) noexcep - }/*}}}*/ - - static zval * -+#if PHP_VERSION_ID < 80000 - php_parle_stack_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot) noexcept - {/*{{{*/ - zval tmp_member, *prop; -@@ -2503,6 +2736,11 @@ php_parle_stack_get_property_ptr_ptr(zval *object, zval *member, int type, void - member = &tmp_member; - cache_slot = NULL; - } -+#else -+php_parle_stack_get_property_ptr_ptr(zend_object *object, zend_string *member, int type, void **cache_slot) noexcept -+{/*{{{*/ -+ zval *prop; -+#endif - - if (PARLE_IS_PROP("top") || PARLE_IS_PROP("empty") || PARLE_IS_PROP("size")) { - /* Fallback to read_property. */ -@@ -2511,9 +2749,11 @@ php_parle_stack_get_property_ptr_ptr(zval *object, zval *member, int type, void - - prop = (zend_get_std_object_handlers())->get_property_ptr_ptr(object, member, type, cache_slot); - -+#if PHP_VERSION_ID < 80000 - if (member == &tmp_member) { - zval_dtor(member); - } -+#endif - - return prop; - }/*}}}*/ -diff --git a/tests/reflection_002.phpt b/tests/reflection_002.phpt -index 432f4f1..1919243 100644 ---- a/tests/reflection_002.phpt -+++ b/tests/reflection_002.phpt -@@ -74,9 +74,9 @@ try { - - ?> - ==DONE== ----EXPECT-- --Argument 2 passed to Parle\Parser::validate() must be an instance of Parle\Lexer, instance of Parle\RLexer given --Argument 2 passed to Parle\Parser::consume() must be an instance of Parle\Lexer, instance of Parle\RLexer given --Argument 2 passed to Parle\RParser::validate() must be an instance of Parle\RLexer, instance of Parle\Lexer given --Argument 2 passed to Parle\RParser::consume() must be an instance of Parle\RLexer, instance of Parle\Lexer given -+--EXPECTF-- -+%s\Parser::validate()%s Parle\RLexer given -+%s\Parser::consume()%s Parle\RLexer given -+%s\RParser::validate()%s Parle\Lexer given -+%s\RParser::consume()%s Parle\Lexer given - ==DONE== diff --git a/7c692b9880aa6a501b6627d923bbc8ed1da1465f.patch b/7c692b9880aa6a501b6627d923bbc8ed1da1465f.patch deleted file mode 100644 index 5b81584..0000000 --- a/7c692b9880aa6a501b6627d923bbc8ed1da1465f.patch +++ /dev/null @@ -1,190 +0,0 @@ -From 7c692b9880aa6a501b6627d923bbc8ed1da1465f Mon Sep 17 00:00:00 2001 -From: Anatol Belski -Date: Sat, 1 Jun 2019 14:12:31 +0200 -Subject: [PATCH] Fix 7.4+ compatibility - ---- - parle.cpp | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++---- - 1 file changed, 79 insertions(+), 6 deletions(-) - -diff --git a/parle.cpp b/parle.cpp -index 6a46e4d..087de5e 100644 ---- a/parle.cpp -+++ b/parle.cpp -@@ -1771,7 +1771,12 @@ php_parle_rlexer_read_property(zval *object, zval *member, int type, void **cach - return php_parle_lex_read_property(object, member, type, cache_slot, rv); - }/*}}}*/ - --template void -+template -+#if PHP_VERSION_ID >= 70400 -+zval * -+#else -+void -+#endif - php_parle_lex_write_property(zval *object, zval *member, zval *value, void **cache_slot) noexcept - {/*{{{*/ - lexer_obj_type *zplo; -@@ -1796,11 +1801,20 @@ php_parle_lex_write_property(zval *object, zval *member, zval *value, void **cac - } - } else if (PARLE_IS_PROP("flags")) { - lex.rules.flags(zval_get_long(value)); -- } else PARLE_LEX_CHECK_THROW_RO_PROP("state") -+ } -+#if PHP_VERSION_ID >= 70400 -+ else PARLE_LEX_CHECK_THROW_RET_RO_PROP("state") -+ else PARLE_LEX_CHECK_THROW_RET_RO_PROP("cursor") -+ else PARLE_LEX_CHECK_THROW_RET_RO_PROP("marker") -+ else PARLE_LEX_CHECK_THROW_RET_RO_PROP("line") -+ else PARLE_LEX_CHECK_THROW_RET_RO_PROP("column") -+#else -+ else PARLE_LEX_CHECK_THROW_RO_PROP("state") - else PARLE_LEX_CHECK_THROW_RO_PROP("cursor") - else PARLE_LEX_CHECK_THROW_RO_PROP("marker") - else PARLE_LEX_CHECK_THROW_RO_PROP("line") - else PARLE_LEX_CHECK_THROW_RO_PROP("column") -+#endif - else { - (zend_get_std_object_handlers())->write_property(object, member, value, cache_slot); - } -@@ -1808,17 +1822,35 @@ php_parle_lex_write_property(zval *object, zval *member, zval *value, void **cac - if (member == &tmp_member) { - zval_dtor(member); - } -+ -+#if PHP_VERSION_ID >= 70400 -+ return value; -+#endif - }/*}}}*/ - -+#if PHP_VERSION_ID >= 70400 -+static zval * -+#else - static void -+#endif - php_parle_lexer_write_property(zval *object, zval *member, zval *value, void **cache_slot) noexcept - {/*{{{*/ -+#if PHP_VERSION_ID >= 70400 -+ return -+#endif - php_parle_lex_write_property(object, member, value, cache_slot); - }/*}}}*/ - -+#if PHP_VERSION_ID >= 70400 -+static zval * -+#else - static void -+#endif - php_parle_rlexer_write_property(zval *object, zval *member, zval *value, void **cache_slot) noexcept - {/*{{{*/ -+#if PHP_VERSION_ID >= 70400 -+ return -+#endif - php_parle_lex_write_property(object, member, value, cache_slot); - }/*}}}*/ - -@@ -2061,7 +2093,12 @@ php_parle_rparser_read_property(zval *object, zval *member, int type, void **cac - return php_parle_par_read_property(object, member, type, cache_slot, rv); - }/*}}}*/ - --template void -+template -+#if PHP_VERSION_ID >= 70400 -+zval * -+#else -+void -+#endif - php_parle_par_write_property(zval *object, zval *member, zval *value, void **cache_slot) noexcept - {/*{{{*/ - zval tmp_member; -@@ -2073,8 +2110,13 @@ php_parle_par_write_property(zval *object, zval *member, zval *value, void **cac - cache_slot = NULL; - } - -+#if PHP_VERSION_ID >= 70400 -+ PARLE_PAR_CHECK_THROW_RET_RO_PROP("action") -+ else PARLE_PAR_CHECK_THROW_RET_RO_PROP("reduceId") -+#else - PARLE_PAR_CHECK_THROW_RO_PROP("action") - else PARLE_PAR_CHECK_THROW_RO_PROP("reduceId") -+#endif - else { - (zend_get_std_object_handlers())->write_property(object, member, value, cache_slot); - } -@@ -2082,18 +2124,36 @@ php_parle_par_write_property(zval *object, zval *member, zval *value, void **cac - if (member == &tmp_member) { - zval_dtor(member); - } -+ -+#if PHP_VERSION_ID >= 70400 -+ return value; -+#endif - }/*}}}*/ - -+#if PHP_VERSION_ID >= 70400 -+static zval * -+#else - static void -+#endif - php_parle_parser_write_property(zval *object, zval *member, zval *value, void **cache_slot) noexcept - {/*{{{*/ -- return php_parle_par_write_property(object, member, value, cache_slot); -+#if PHP_VERSION_ID >= 70400 -+ return -+#endif -+ php_parle_par_write_property(object, member, value, cache_slot); - }/*}}}*/ - -+#if PHP_VERSION_ID >= 70400 -+static zval * -+#else - static void -+#endif - php_parle_rparser_write_property(zval *object, zval *member, zval *value, void **cache_slot) noexcept - {/*{{{*/ -- return php_parle_par_write_property(object, member, value, cache_slot); -+#if PHP_VERSION_ID >= 70400 -+ return -+#endif -+ php_parle_par_write_property(object, member, value, cache_slot); - }/*}}}*/ - - template HashTable * -@@ -2303,7 +2363,11 @@ php_parle_stack_read_property(zval *object, zval *member, int type, void **cache - return retval; - }/*}}}*/ - -+#if PHP_VERSION_ID >= 70400 -+static zval * -+#else - static void -+#endif - php_parle_stack_write_property(zval *object, zval *member, zval *value, void **cache_slot) noexcept - {/*{{{*/ - ze_parle_stack_obj *zpso; -@@ -2336,8 +2400,14 @@ php_parle_stack_write_property(zval *object, zval *member, zval *value, void **c - zval_ptr_dtor(old); - efree(old); - } -- } else PARLE_STACK_CHECK_THROW_RO_PROP("empty") -+ } -+#if PHP_VERSION_ID >= 70400 -+ else PARLE_STACK_CHECK_THROW_RET_RO_PROP("empty") -+ else PARLE_STACK_CHECK_THROW_RET_RO_PROP("size") -+#else -+ else PARLE_STACK_CHECK_THROW_RO_PROP("empty") - else PARLE_STACK_CHECK_THROW_RO_PROP("size") -+#endif - else { - (zend_get_std_object_handlers())->write_property(object, member, value, cache_slot); - } -@@ -2345,6 +2415,9 @@ php_parle_stack_write_property(zval *object, zval *member, zval *value, void **c - if (member == &tmp_member) { - zval_dtor(member); - } -+#if PHP_VERSION_ID >= 70400 -+ return value; -+#endif - }/*}}}*/ - - static HashTable * diff --git a/PHPINFO b/PHPINFO index 12c9004..843bba4 100644 --- a/PHPINFO +++ b/PHPINFO @@ -2,5 +2,5 @@ parle Lexing and parsing support => enabled -Parle version => 0.8.1 +Parle version => 0.8.2 Parle internal UTF-32 => no diff --git a/REFLECTION b/REFLECTION index 0178b3c..9ead55c 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #119 parle version 0.8.1 ] { +Extension [ extension #119 parle version 0.8.2 ] { - Constants [1] { Constant [ bool Parle\INTERNAL_UTF32 ] { } diff --git a/php-pecl-parle.spec b/php-pecl-parle.spec index 4ee63da..c48a380 100644 --- a/php-pecl-parle.spec +++ b/php-pecl-parle.spec @@ -10,30 +10,26 @@ # we don't want -z defs linker flag %undefine _strict_symbol_defs_build +%bcond_without tests %if 0%{?scl:1} %scl_package php-pecl-parle %global sub_prefix %{scl_prefix} %endif %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} -%global with_tests 0%{!?_without_tests:1} %global pecl_name parle # After json %global ini_name 40-%{pecl_name}.ini Summary: Parsing and lexing Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 0.8.1 -Release: 9%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Version: 0.8.2 +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} # Extension is BSD, libraries are Boost License: BSD and Boost URL: https://pecl.php.net/package/%{pecl_name} Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz -Patch0: https://github.com/weltling/parle/commit/7c692b9880aa6a501b6627d923bbc8ed1da1465f.patch -Patch1: https://patch-diff.githubusercontent.com/raw/weltling/parle/pull/17.patch -Patch2: https://patch-diff.githubusercontent.com/raw/weltling/parle/pull/22.patch - BuildRequires: make %if 0%{?rhel} == 7 && 0%{?dtsversion} == 0 # Always use DTS as c++14 is required @@ -107,9 +103,6 @@ mv NTS/lib/parsertl14/parsertl/licence_1_0.txt NTS/LICENSE.parsertl14 %endif cd NTS -%patch0 -p1 -b .up -%patch1 -p1 -b .pr17 -%patch2 -p1 -b .pr22 # Sanity check, really often broken extver=$(sed -n '/#define PHP_PARLE_VERSION/{s/.* "//;s/".*$//;p}' php_parle.h) @@ -186,7 +179,7 @@ cd NTS --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --modules | grep %{pecl_name} -%if %{with_tests} +%if %{with tests} : Upstream test suite make test "TESTS=--show-diff" %endif @@ -198,7 +191,7 @@ cd ../ZTS --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ --modules | grep %{pecl_name} -%if %{with_tests} +%if %{with tests} : Upstream test suite make test "TESTS=--show-diff" %endif @@ -241,6 +234,10 @@ fi ######### TODO : use --enable-parle-utf32 ? %changelog +* Mon Jan 18 2021 Remi Collet - 0.8.2-1 +- update to 0.8.2 +- drop patches merged upstream + * Fri Jan 15 2021 Remi Collet - 0.8.1-9 - add patch for 8.0 from https://github.com/weltling/parle/pull/22 -- cgit