diff options
Diffstat (limited to 'src/lanes.c')
-rw-r--r-- | src/lanes.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lanes.c b/src/lanes.c index 332a1b8..deee90c 100644 --- a/src/lanes.c +++ b/src/lanes.c | |||
@@ -790,7 +790,7 @@ LUAG_FUNC( set_debug_threadname) | |||
790 | { | 790 | { |
791 | DECLARE_CONST_UNIQUE_KEY( hidden_regkey, LG_set_debug_threadname); | 791 | DECLARE_CONST_UNIQUE_KEY( hidden_regkey, LG_set_debug_threadname); |
792 | // C s_lane structure is a light userdata upvalue | 792 | // C s_lane structure is a light userdata upvalue |
793 | Lane* s = lua_touserdata( L, lua_upvalueindex( 1)); | 793 | Lane* s = (Lane*) lua_touserdata( L, lua_upvalueindex( 1)); |
794 | luaL_checktype( L, -1, LUA_TSTRING); // "name" | 794 | luaL_checktype( L, -1, LUA_TSTRING); // "name" |
795 | lua_settop( L, 1); | 795 | lua_settop( L, 1); |
796 | STACK_CHECK_ABS( L, 1); | 796 | STACK_CHECK_ABS( L, 1); |
@@ -1225,7 +1225,7 @@ LUAG_FUNC( lane_new) | |||
1225 | // 's' is allocated from heap, not Lua, since its life span may surpass the handle's (if free running thread) | 1225 | // 's' is allocated from heap, not Lua, since its life span may surpass the handle's (if free running thread) |
1226 | // | 1226 | // |
1227 | // a Lane full userdata needs a single uservalue | 1227 | // a Lane full userdata needs a single uservalue |
1228 | ud = lua_newuserdatauv( L, sizeof( Lane*), 1); // func libs priority globals package required gc_cb lane | 1228 | ud = (Lane**) lua_newuserdatauv( L, sizeof( Lane*), 1); // func libs priority globals package required gc_cb lane |
1229 | { | 1229 | { |
1230 | AllocatorDefinition* const allocD = &U->internal_allocator; | 1230 | AllocatorDefinition* const allocD = &U->internal_allocator; |
1231 | s = *ud = (Lane*) allocD->allocF(allocD->allocUD, NULL, 0, sizeof(Lane)); | 1231 | s = *ud = (Lane*) allocD->allocF(allocD->allocUD, NULL, 0, sizeof(Lane)); |
@@ -2074,7 +2074,7 @@ static void EnableCrashingOnCrashes( void) | |||
2074 | } | 2074 | } |
2075 | #endif // PLATFORM_WIN32 | 2075 | #endif // PLATFORM_WIN32 |
2076 | 2076 | ||
2077 | int LANES_API luaopen_lanes_core( lua_State* L) | 2077 | LANES_API int luaopen_lanes_core( lua_State* L) |
2078 | { | 2078 | { |
2079 | #if defined PLATFORM_WIN32 && !defined NDEBUG | 2079 | #if defined PLATFORM_WIN32 && !defined NDEBUG |
2080 | EnableCrashingOnCrashes(); | 2080 | EnableCrashingOnCrashes(); |
@@ -2129,7 +2129,7 @@ static int default_luaopen_lanes( lua_State* L) | |||
2129 | } | 2129 | } |
2130 | 2130 | ||
2131 | // call this instead of luaopen_lanes_core() when embedding Lua and Lanes in a custom application | 2131 | // call this instead of luaopen_lanes_core() when embedding Lua and Lanes in a custom application |
2132 | void LANES_API luaopen_lanes_embedded( lua_State* L, lua_CFunction _luaopen_lanes) | 2132 | LANES_API void luaopen_lanes_embedded( lua_State* L, lua_CFunction _luaopen_lanes) |
2133 | { | 2133 | { |
2134 | STACK_CHECK( L, 0); | 2134 | STACK_CHECK( L, 0); |
2135 | // pre-require lanes.core so that when lanes.lua calls require "lanes.core" it finds it is already loaded | 2135 | // pre-require lanes.core so that when lanes.lua calls require "lanes.core" it finds it is already loaded |