diff options
author | Benoit Germain <b n t DOT g e r m a i n AT g m a i l DOT c o m> | 2018-11-03 15:39:14 +0100 |
---|---|---|
committer | Benoit Germain <b n t DOT g e r m a i n AT g m a i l DOT c o m> | 2018-11-03 15:39:14 +0100 |
commit | ebaadef11d4cb55a5dde78ed392b7d7e4ad15030 (patch) | |
tree | 0c91345c4e21f5dd1c9006d8545684442aa97e5a /src/lanes.c | |
parent | 94c794c8e06a848868509927eefde0741cd8bbe6 (diff) | |
download | lanes-ebaadef11d4cb55a5dde78ed392b7d7e4ad15030.tar.gz lanes-ebaadef11d4cb55a5dde78ed392b7d7e4ad15030.tar.bz2 lanes-ebaadef11d4cb55a5dde78ed392b7d7e4ad15030.zip |
fix an internal error trying to call on_state_create in a lane without any libs loaded
always duplicate the config structure in new lanes even when no
libraries are initialized by the generator
Diffstat (limited to 'src/lanes.c')
-rw-r--r-- | src/lanes.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lanes.c b/src/lanes.c index f2e7927..7b1a707 100644 --- a/src/lanes.c +++ b/src/lanes.c | |||
@@ -2296,12 +2296,6 @@ LUAG_FUNC( lane_new) | |||
2296 | } | 2296 | } |
2297 | else | 2297 | else |
2298 | { | 2298 | { |
2299 | // if is it "lanes" or "lanes.core", make sure we have copied the initial settings over | ||
2300 | // which might not be the case if the libs list didn't include lanes.core or "*" | ||
2301 | if( strncmp( name, "lanes.core", len) == 0) // this works both both "lanes" and "lanes.core" because of len | ||
2302 | { | ||
2303 | luaG_copy_one_time_settings( U, L, L2); | ||
2304 | } | ||
2305 | lua_pushlstring( L2, name, len); // require() name | 2299 | lua_pushlstring( L2, name, len); // require() name |
2306 | if( lua_pcall( L2, 1, 1, 0) != LUA_OK) // ret/errcode | 2300 | if( lua_pcall( L2, 1, 1, 0) != LUA_OK) // ret/errcode |
2307 | { | 2301 | { |
@@ -3116,6 +3110,9 @@ LUAG_FUNC( configure) | |||
3116 | lua_getfield( L, 1, "verbose_errors"); // settings verbose_errors | 3110 | lua_getfield( L, 1, "verbose_errors"); // settings verbose_errors |
3117 | U->verboseErrors = lua_toboolean( L, -1); | 3111 | U->verboseErrors = lua_toboolean( L, -1); |
3118 | lua_pop( L, 1); // settings | 3112 | lua_pop( L, 1); // settings |
3113 | lua_getfield( L, 1, "demote_full_userdata"); // settings demote_full_userdata | ||
3114 | U->demoteFullUserdata = lua_toboolean( L, -1); | ||
3115 | lua_pop( L, 1); // settings | ||
3119 | #if HAVE_LANE_TRACKING | 3116 | #if HAVE_LANE_TRACKING |
3120 | MUTEX_INIT( &U->tracking_cs); | 3117 | MUTEX_INIT( &U->tracking_cs); |
3121 | lua_getfield( L, 1, "track_lanes"); // settings track_lanes | 3118 | lua_getfield( L, 1, "track_lanes"); // settings track_lanes |