diff options
author | Benoit Germain <bnt.germain@gmail.com> | 2018-11-19 09:16:49 +0100 |
---|---|---|
committer | Benoit Germain <bnt.germain@gmail.com> | 2018-11-19 09:16:49 +0100 |
commit | 7b4f59c5ebc84e426e2876906b24d7dd73342f07 (patch) | |
tree | f05748fc2d75c43c25865be01677271fff5d86e4 /src/lanes_private.h | |
parent | 01f83215a2ad235fbf306f591c6c0547b1bb7047 (diff) | |
download | lanes-7b4f59c5ebc84e426e2876906b24d7dd73342f07.tar.gz lanes-7b4f59c5ebc84e426e2876906b24d7dd73342f07.tar.bz2 lanes-7b4f59c5ebc84e426e2876906b24d7dd73342f07.zip |
Internal code tweaks
* Registry access code utility macros
* CONFIG_REGKEY and LOOKUP_REGKEY are now lightuserdata instead of strings
* Stack checking debug macros improvements
Diffstat (limited to 'src/lanes_private.h')
-rw-r--r-- | src/lanes_private.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lanes_private.h b/src/lanes_private.h index 1adfa31..16c178d 100644 --- a/src/lanes_private.h +++ b/src/lanes_private.h | |||
@@ -96,9 +96,8 @@ static inline Lane* get_lane_from_registry( lua_State* L) | |||
96 | { | 96 | { |
97 | Lane* s; | 97 | Lane* s; |
98 | STACK_GROW( L, 1); | 98 | STACK_GROW( L, 1); |
99 | STACK_CHECK( L); | 99 | STACK_CHECK( L, 0); |
100 | push_unique_key( L, CANCEL_TEST_KEY); | 100 | REGISTRY_GET( L, CANCEL_TEST_KEY); |
101 | lua_rawget( L, LUA_REGISTRYINDEX); | ||
102 | s = lua_touserdata( L, -1); // lightuserdata (true 's_lane' pointer) / nil | 101 | s = lua_touserdata( L, -1); // lightuserdata (true 's_lane' pointer) / nil |
103 | lua_pop( L, 1); | 102 | lua_pop( L, 1); |
104 | STACK_END( L, 0); | 103 | STACK_END( L, 0); |