From 7dc38e079afce8c44b7771076ff89e60e16acea9 Mon Sep 17 00:00:00 2001 From: giuseppeM99 Date: Thu, 3 Aug 2017 12:18:18 +0200 Subject: [PATCH 1/2] Fixes for lua 5.3 --- lua.c | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/lua.c b/lua.c index d5f4acd..40b38d7 100755 --- a/lua.c +++ b/lua.c @@ -209,7 +209,7 @@ zend_object *php_lua_create_object(zend_class_entry *ce) object_properties_init(&intern->obj, ce); intern->obj.handlers = &lua_object_handlers; - + return &intern->obj; } /* }}} */ @@ -286,11 +286,11 @@ static int php_lua_call_callback(lua_State *L) { order = lua_tonumber(L, lua_upvalueindex(1)); callbacks = zend_read_static_property(lua_ce, ZEND_STRL("_callbacks"), 1); - + if (ZVAL_IS_NULL(callbacks)) { return 0; } - + func = zend_hash_index_find(Z_ARRVAL_P(callbacks), order); if (!zend_is_callable(func, 0, NULL)) { @@ -310,7 +310,7 @@ static int php_lua_call_callback(lua_State *L) { for (i = 0; iL; - + luaL_openlibs(L); lua_register(L, "print", php_lua_print); if (ZEND_NUM_ARGS()) { From 4a0a219fbc716cbcfa6814baea19e7ba684170c3 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Mon, 14 Aug 2017 19:07:43 +0200 Subject: [PATCH 2/2] Fixes --- config.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.m4 b/config.m4 index 19341af..c0f6b69 100755 --- a/config.m4 +++ b/config.m4 @@ -50,7 +50,7 @@ if test "$PHP_LUA" != "no"; then LUA_LIB_DIR=$PHP_LUA/$PHP_LIBDIR else AC_MSG_CHECKING(for lua library in default path) - for i in /usr/$PHP_LIBDIR /usr/lib /usr/lib64 /usr/lib/x86_64-linux-gnu; do + for i in /usr/$PHP_LIBDIR /usr/lib /usr/lib64 /usr/lib/x86_64-linux-gnu /usr/local/lib; 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)