aboutsummaryrefslogtreecommitdiff
path: root/src/lanes.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lanes.c')
-rw-r--r--src/lanes.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lanes.c b/src/lanes.c
index 5a1f94a..aeba5fb 100644
--- a/src/lanes.c
+++ b/src/lanes.c
@@ -275,7 +275,8 @@ static DECLARE_CONST_UNIQUE_KEY( STACK_TRACE_KEY, 0x024d5411677ce879);
275* error (and maybe stack trace) parameters to the finalizer functions would 275* error (and maybe stack trace) parameters to the finalizer functions would
276* anyways complicate that approach. 276* anyways complicate that approach.
277*/ 277*/
278#define FINALIZER_REG_KEY ((void*)LG_set_finalizer) 278// crc64/we of string "STACK_TRACE_KEY" generated at http://www.nitrxgen.net/hashgen/
279static DECLARE_CONST_UNIQUE_KEY( FINALIZER_REG_KEY, 0x7902972781c7e365);
279 280
280struct s_Linda; 281struct s_Linda;
281 282
@@ -301,11 +302,11 @@ struct s_Linda;
301* Returns: TRUE if a table was pushed 302* Returns: TRUE if a table was pushed
302* FALSE if no table found, not created, and nothing pushed 303* FALSE if no table found, not created, and nothing pushed
303*/ 304*/
304static bool_t push_registry_table( lua_State* L, void* key, bool_t create) 305static bool_t push_registry_table( lua_State* L, UniqueKey key, bool_t create)
305{ 306{
306 STACK_GROW( L, 3); 307 STACK_GROW( L, 3);
307 STACK_CHECK( L); 308 STACK_CHECK( L);
308 lua_pushlightuserdata( L, key); // key 309 push_unique_key( L, key); // key
309 lua_rawget( L, LUA_REGISTRYINDEX); // t? 310 lua_rawget( L, LUA_REGISTRYINDEX); // t?
310 311
311 if( lua_isnil( L, -1)) // nil? 312 if( lua_isnil( L, -1)) // nil?
@@ -318,7 +319,7 @@ static bool_t push_registry_table( lua_State* L, void* key, bool_t create)
318 } 319 }
319 320
320 lua_newtable( L); // t 321 lua_newtable( L); // t
321 lua_pushlightuserdata( L, key); // t key 322 push_unique_key( L, key); // t key
322 lua_pushvalue( L, -2); // t key t 323 lua_pushvalue( L, -2); // t key t
323 lua_rawset( L, LUA_REGISTRYINDEX); // t 324 lua_rawset( L, LUA_REGISTRYINDEX); // t
324 } 325 }