aboutsummaryrefslogtreecommitdiff
path: root/src/deep.h
diff options
context:
space:
mode:
authorBenoit Germain <bnt period germain arrobase gmail period com>2014-02-17 11:05:19 +0100
committerBenoit Germain <bnt period germain arrobase gmail period com>2014-02-17 11:05:19 +0100
commit47eb3f94373a13ac9f204ca65dfde602f53bdc1a (patch)
tree95d7d7a52ca92e6527d46d97207d3f079611a355 /src/deep.h
parent32ad991eb8c590472607d61e9a831d2ca9db05c5 (diff)
downloadlanes-47eb3f94373a13ac9f204ca65dfde602f53bdc1a.tar.gz
lanes-47eb3f94373a13ac9f204ca65dfde602f53bdc1a.tar.bz2
lanes-47eb3f94373a13ac9f204ca65dfde602f53bdc1a.zip
Deep userdata support improvements
* bumped version to 3.9.0 * keepers now require "package", receive package.path & package.cpath, and call on_state_create() if it is a C function * changed the deep public API (improved deep idfunc signature, renamed luaG_deep_userdata to luaG_newdeepuserdata) * if an error occurs while copying a deep userdata, don't raise inside the keeper state * fixed situations where raised errors could lead to memory leaks (deep gc)
Diffstat (limited to 'src/deep.h')
-rw-r--r--src/deep.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/deep.h b/src/deep.h
index 1315157..e1f2c4f 100644
--- a/src/deep.h
+++ b/src/deep.h
@@ -15,9 +15,17 @@
15#define LANES_API 15#define LANES_API
16#endif // (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC) 16#endif // (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC)
17 17
18typedef void (*luaG_IdFunction)( lua_State* L, char const* const which); 18enum eDeepOp
19{
20 eDO_new,
21 eDO_delete,
22 eDO_metatable,
23 eDO_module,
24};
19 25
20extern LANES_API int luaG_deep_userdata( lua_State* L, luaG_IdFunction idfunc); 26typedef void* (*luaG_IdFunction)( lua_State* L, enum eDeepOp op_);
27
28extern LANES_API int luaG_newdeepuserdata( lua_State* L, luaG_IdFunction idfunc);
21extern LANES_API void* luaG_todeep( lua_State* L, luaG_IdFunction idfunc, int index); 29extern LANES_API void* luaG_todeep( lua_State* L, luaG_IdFunction idfunc, int index);
22 30
23#endif // __LANES_DEEP_H__ 31#endif // __LANES_DEEP_H__