From b56130d45b70d62ff7ead21fad4274a18027ac26 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 24 Oct 2013 08:11:15 +0200 Subject: [PATCH 1/9] drop package2.xml, no more supported --- package.xml | 262 ++++++++++++++++++++++++++++++++++++++------------- package2.xml | 200 --------------------------------------- 2 files changed, 197 insertions(+), 265 deletions(-) delete mode 100644 package2.xml diff --git a/package.xml b/package.xml index 6e90c83..426cd75 100644 --- a/package.xml +++ b/package.xml @@ -1,68 +1,200 @@ - - - + + lua + pecl.php.net Embedded lua interpreter - "Lua is a powerful, fast, light-weight, embeddable scripting language." - This extension embeds the lua interpreter and offers an OO-API to lua variables and functions. - - - - johannes - Johannes Schlüter - johannes@php.net - lead - - - laruence - Xinchen Hui - laruence@php.net - lead - - - msaraujo - Marcelo Araujo - msaraujo@php.net - developer - - - - 1.1.0 - 2013-10-23 - PHP - beta - - Fixed #65097 (nApplyCount release missing) (emptyhua at gmail dot com) -- Trigger E_STRICT when pass an array with index '0' to lua instead of ignoring it -- added support for callable functions and closures as values returned injected into lua engine (harald at octris dot org) - - - - - + "Lua is a powerful, fast, light-weight, embeddable scripting language." + This extension embeds the lua interpreter and offers an OO-API to lua variables and functions. + + Johannes Schlüter + johannes + johannes@php.net + yes + + + Xinchen Hui + laruence + laruence@php.net + yes + + + Marcelo Araujo + msaraujo + msaraujo@php.net + yes + + 2013-10-23 + + + 1.1.0 + 1.1.0 + + + beta + beta + + PHP + + - Fixed #65097 (nApplyCount release missing) (emptyhua at gmail dot com) + - Trigger E_STRICT when pass an array with index '0' to lua instead of ignoring it + - added support for callable functions and closures as values returned injected into lua engine (harald at octris dot org) + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + 5.1.0 + + + 1.4.0 + + + + lua + + + + 2012-10-23 + + 1.1.0 + 1.1.0 + + + beta + beta + + PHP License + + - Fixed #65097 (nApplyCount release missing) (emptyhua at gmail dot com) + - Trigger E_STRICT when pass an array with index '0' to lua instead of ignoring it + - added support for callable functions and closures as values returned injected into lua engine (harald at octris dot org) + + + + + 2012-06-24 + + 1.0.0 + 1.0.0 + + + stable + stable + + PHP License + + - Release stable version + + + + 2012-03-19 + + 0.9.4 + 0.9.4 + + + beta + beta + + PHP License + + - Compatible with lua 5.2 + + + + 2012-01-12 + + 0.9.3 + 0.9.3 + + + beta + beta + + PHP License + + - Fix build on windows + - Fix build when building lua with static + + + + 2012-01-06 + + 0.9.2 + 0.9.2 + + + beta + beta + + PHP License + + - Fixed bug #60641 PECL install lua with lua5.1 packages + + + + 2011-11-24 + + 0.9.1 + 0.9.1 + + + beta + beta + + PHP License + + - Compatible with PHP5.3+ + - Fix ZTS build + - Fix mem leak when get value from lua + + + + 2011-08-03 + + 0.9.0 + 0.9.0 + + + beta + beta + + PHP License + + - Merge Plua into Lua + - Api changes + - Add supporting for LUA_TFUNCTION + + + + + diff --git a/package2.xml b/package2.xml deleted file mode 100644 index 426cd75..0000000 --- a/package2.xml +++ /dev/null @@ -1,200 +0,0 @@ - - - lua - pecl.php.net - Embedded lua interpreter - "Lua is a powerful, fast, light-weight, embeddable scripting language." - This extension embeds the lua interpreter and offers an OO-API to lua variables and functions. - - Johannes Schlüter - johannes - johannes@php.net - yes - - - Xinchen Hui - laruence - laruence@php.net - yes - - - Marcelo Araujo - msaraujo - msaraujo@php.net - yes - - 2013-10-23 - - - 1.1.0 - 1.1.0 - - - beta - beta - - PHP - - - Fixed #65097 (nApplyCount release missing) (emptyhua at gmail dot com) - - Trigger E_STRICT when pass an array with index '0' to lua instead of ignoring it - - added support for callable functions and closures as values returned injected into lua engine (harald at octris dot org) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5.1.0 - - - 1.4.0 - - - - lua - - - - 2012-10-23 - - 1.1.0 - 1.1.0 - - - beta - beta - - PHP License - - - Fixed #65097 (nApplyCount release missing) (emptyhua at gmail dot com) - - Trigger E_STRICT when pass an array with index '0' to lua instead of ignoring it - - added support for callable functions and closures as values returned injected into lua engine (harald at octris dot org) - - - - - 2012-06-24 - - 1.0.0 - 1.0.0 - - - stable - stable - - PHP License - - - Release stable version - - - - 2012-03-19 - - 0.9.4 - 0.9.4 - - - beta - beta - - PHP License - - - Compatible with lua 5.2 - - - - 2012-01-12 - - 0.9.3 - 0.9.3 - - - beta - beta - - PHP License - - - Fix build on windows - - Fix build when building lua with static - - - - 2012-01-06 - - 0.9.2 - 0.9.2 - - - beta - beta - - PHP License - - - Fixed bug #60641 PECL install lua with lua5.1 packages - - - - 2011-11-24 - - 0.9.1 - 0.9.1 - - - beta - beta - - PHP License - - - Compatible with PHP5.3+ - - Fix ZTS build - - Fix mem leak when get value from lua - - - - 2011-08-03 - - 0.9.0 - 0.9.0 - - - beta - beta - - PHP License - - - Merge Plua into Lua - - Api changes - - Add supporting for LUA_TFUNCTION - - - - - From c4f51f3b43f9219031c85cc6d050183cc48e5aea Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 24 Oct 2013 08:12:05 +0200 Subject: [PATCH 2/9] fix role for doc --- package.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.xml b/package.xml index 426cd75..7d9e071 100644 --- a/package.xml +++ b/package.xml @@ -47,9 +47,9 @@ - - - + + + From 5489007dc8a067552dc632c7d440b539ce346a3c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 24 Oct 2013 08:12:32 +0200 Subject: [PATCH 3/9] missing test --- package.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/package.xml b/package.xml index 7d9e071..33ddadc 100644 --- a/package.xml +++ b/package.xml @@ -64,6 +64,7 @@ + From bef3b82b47f7da72c0aef967f83eb1449bce4062 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 24 Oct 2013 08:16:46 +0200 Subject: [PATCH 4/9] quick fix to allow build against shared system library --- config.m4 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config.m4 b/config.m4 index 990b4bf..e762900 100644 --- a/config.m4 +++ b/config.m4 @@ -21,14 +21,14 @@ if test "$PHP_LUA" != "no"; then AC_MSG_ERROR(Please reinstall the lua distribution - lua.h should be in /include/) fi - LUA_LIB_NAME=liblua.a + LUA_LIB_NAME=liblua - if test -r $PHP_LUA/$PHP_LIBDIR/${LUA_LIB_NAME}; then + if test -r $PHP_LUA/$PHP_LIBDIR/${LUA_LIB_NAME}.${SHLIB_SUFFIX_NAME} -o -r $PHP_LUA/$PHP_LIBDIR/${LUA_LIB_NAME}.a; then LUA_LIB_DIR=$PHP_LUA/$PHP_LIBDIR else AC_MSG_CHECKING(for lua library in default path) - for i in /usr/lib /usr/lib64; do - if test -r $i/${LUA_LIB_NAME}; then + for i in /usr/$PHP_LIBDIR /usr/lib /usr/lib64; do + if test -r $i/${LUA_LIB_NAME}.${SHLIB_SUFFIX_NAME} -o -r $i/${LUA_LIB_NAME}.a; then LUA_LIB_DIR=$i AC_MSG_RESULT(found in $i) break From 4c8fff9af56a3474c6de2dcf3ef0a1bee9095f2a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 24 Oct 2013 08:17:43 +0200 Subject: [PATCH 5/9] LUA_OK is 5.2 --- php_lua.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/php_lua.h b/php_lua.h index 8290694..d8a6f63 100644 --- a/php_lua.h +++ b/php_lua.h @@ -24,6 +24,11 @@ #include "lauxlib.h" #include "lualib.h" +/* LUA_OK is defined sinc 5.2 */ +#ifndef LUA_OK +#define LUA_OK 0 +#define + extern zend_module_entry lua_module_entry; #define phpext_lua_ptr &lua_module_entry From 22d5b508e73d744dfd6a062d7905f90c229f1e14 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 24 Oct 2013 08:19:02 +0200 Subject: [PATCH 6/9] LUA_ERRGCMM is 5.2 only --- lua.c | 2 ++ php_lua.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lua.c b/lua.c index 2f6f3a9..023f4f8 100644 --- a/lua.c +++ b/lua.c @@ -892,7 +892,9 @@ PHP_MINIT_FUNCTION(lua) { REGISTER_LONG_CONSTANT("LUA_ERRRUN", LUA_ERRRUN, CONST_PERSISTENT | CONST_CS); REGISTER_LONG_CONSTANT("LUA_ERRSYNTAX", LUA_ERRSYNTAX, CONST_PERSISTENT | CONST_CS); REGISTER_LONG_CONSTANT("LUA_ERRMEM", LUA_ERRMEM, CONST_PERSISTENT | CONST_CS); +#ifdef LUA_ERRGCMM REGISTER_LONG_CONSTANT("LUA_ERRGCMM", LUA_ERRGCMM, CONST_PERSISTENT | CONST_CS); +#endif REGISTER_LONG_CONSTANT("LUA_ERRERR", LUA_ERRERR, CONST_PERSISTENT | CONST_CS); REGISTER_LONG_CONSTANT("LUA_ERRFILE", LUA_ERRFILE, CONST_PERSISTENT | CONST_CS); diff --git a/php_lua.h b/php_lua.h index d8a6f63..0370014 100644 --- a/php_lua.h +++ b/php_lua.h @@ -27,7 +27,7 @@ /* LUA_OK is defined sinc 5.2 */ #ifndef LUA_OK #define LUA_OK 0 -#define +#endif extern zend_module_entry lua_module_entry; #define phpext_lua_ptr &lua_module_entry From 561f632f62b8abf85bc6700840768feb8e42efce Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 24 Oct 2013 08:22:01 +0200 Subject: [PATCH 7/9] fix test for 5.1, error string have changed --- tests/001.phpt | 2 +- tests/006.phpt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/001.phpt b/tests/001.phpt index 89e89b4..6b9abc2 100644 --- a/tests/001.phpt +++ b/tests/001.phpt @@ -18,4 +18,4 @@ try { --EXPECTF-- 12 -0.53657291800043 -[string "line"]:1: syntax error near 'code' +[string "line"]:1: %s near 'code' diff --git a/tests/006.phpt b/tests/006.phpt index fde0aec..4b22ad8 100644 --- a/tests/006.phpt +++ b/tests/006.phpt @@ -32,7 +32,7 @@ Testing fine Hello PHP Testing broken -%s:%d: syntax error near 'fdrg' +%s:%d: %s near 'fdrg' Testing return Array ( From 10b0cf59cd5ce3b4edac42c83ee38e058aa59e70 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 24 Oct 2013 08:22:57 +0200 Subject: [PATCH 8/9] skip test if json not enabled (or build as shared and so not loaded during make test) --- tests/bug65097.phpt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/bug65097.phpt b/tests/bug65097.phpt index f072d31..48faa6b 100644 --- a/tests/bug65097.phpt +++ b/tests/bug65097.phpt @@ -1,7 +1,10 @@ --TEST-- Bug #65097 (nApplyCount release missing) --SKIPIF-- - + --INI-- error_reporting=E_ALL&~E_STRICT --FILE-- From 99e95d1bf5df72f81f0fad1736839505816a10d3 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 24 Oct 2013 08:27:36 +0200 Subject: [PATCH 9/9] fix [-Wpointer-sign] --- lua.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua.c b/lua.c index 023f4f8..9a0c18a 100644 --- a/lua.c +++ b/lua.c @@ -511,8 +511,8 @@ int php_lua_send_zval_to_lua(lua_State *L, zval *val TSRMLS_DC) { zend_hash_get_current_data(ht, (void **)&ppzval) == SUCCESS; zend_hash_move_forward(ht)) { char *key = NULL; - int len = 0; - long idx = 0; + uint len = 0; + ulong idx = 0; zval *zkey= NULL; switch(zend_hash_get_current_key_ex(ht, &key, &len, &idx, 0, NULL)) {