diff options
author | Lauri Aarnio <Lauri.Aarnio@iki.fi> | 2009-01-20 17:30:36 +0200 |
---|---|---|
committer | Lauri Leukkunen <lle@rahina.org> | 2009-02-10 08:38:09 +0200 |
commit | 7a8b1e9ee7d714037df9aa81f3e620f774634232 (patch) | |
tree | d05aa9da8cf14544e575327bbaa3acb542c0367a /include | |
parent | 86819da08f67b3f59c09dd68a2c3414e17d99a26 (diff) |
Improved debug messages (of the the preload library)
- when debugging is enabled, detects and prints nested use of lua_instance
structures.
- from now on, lua_instance pointers returned by get_lua() must be released
with release_lua().
Diffstat (limited to 'include')
-rw-r--r-- | include/sb2.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sb2.h b/include/sb2.h index 955d624..8ea463d 100644 --- a/include/sb2.h +++ b/include/sb2.h @@ -25,6 +25,7 @@ struct lua_instance { lua_State *lua; int mapping_disabled; + int lua_instance_in_use; /* used only if debug messages are active */ }; /* This version string is used to check that the lua scripts offer @@ -49,6 +50,7 @@ struct lua_instance { #define SB2_LUA_C_INTERFACE_VERSION "60,2008-12-07" extern struct lua_instance *get_lua(void); +extern void release_lua(struct lua_instance *ptr); #if 0 extern char *sb_decolonize_path(const char *path); |