mirror of
https://github.com/php-win-ext/php-lua.git
synced 2026-04-28 03:23:13 +02:00
Refactor LuaClosure
Use proper internal object storage rather than private props. Favor NULL clone_obj handler over empty private __clone method. Favor free_obj handler over __destruct() method.
This commit is contained in:
@@ -61,6 +61,7 @@ static inline php_lua_object *php_lua_obj_from_obj(zend_object *obj) {
|
||||
return (php_lua_object*)((char*)(obj)-XtOffsetOf(php_lua_object, obj));
|
||||
}
|
||||
|
||||
#define Z_LUAVAL(obj) php_lua_obj_from_obj(Z_OBJ((obj)))
|
||||
#define Z_LUAVAL_P(obj) php_lua_obj_from_obj(Z_OBJ_P((obj)))
|
||||
|
||||
zval *php_lua_get_zval_from_lua(lua_State *L, int index, zval *lua_obj, zval *rv);
|
||||
|
||||
Reference in New Issue
Block a user