aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES3
-rw-r--r--src/lanes.c14
2 files changed, 10 insertions, 7 deletions
diff --git a/CHANGES b/CHANGES
index 07f2994..8f777c5 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
1CHANGES: 1CHANGES:
2 2
3CHANGE 103: BGe 24-Feb-14
4 * Fix lookup database table not being created when it should if Lanes is required in more than one Lua master state
5
3CHANGE 102: BGe 18-Feb-14 6CHANGE 102: BGe 18-Feb-14
4 * raise an error instead of dereferencing a NULL pointer on deep userdata creation and lane struct creation 7 * raise an error instead of dereferencing a NULL pointer on deep userdata creation and lane struct creation
5 8
diff --git a/src/lanes.c b/src/lanes.c
index d6fe170..9f90ff7 100644
--- a/src/lanes.c
+++ b/src/lanes.c
@@ -3034,10 +3034,6 @@ static int init_once_LOCKED( lua_State* L)
3034 lua_insert( L, -2); // Swap key with the Linda object 3034 lua_insert( L, -2); // Swap key with the Linda object
3035 lua_rawset( L, LUA_REGISTRYINDEX); 3035 lua_rawset( L, LUA_REGISTRYINDEX);
3036 3036
3037 // we'll need this every time we transfer some C function from/to this state
3038 lua_newtable( L);
3039 lua_setfield( L, LUA_REGISTRYINDEX, LOOKUP_REGKEY);
3040
3041 STACK_END( L, 0); 3037 STACK_END( L, 0);
3042 return 0; 3038 return 0;
3043} 3039}
@@ -3186,13 +3182,17 @@ LUAG_FUNC( configure)
3186 lua_setfield( L, -2, "require"); // settings M 3182 lua_setfield( L, -2, "require"); // settings M
3187 3183
3188 lua_pushstring(L, VERSION); // settings M VERSION 3184 lua_pushstring(L, VERSION); // settings M VERSION
3189 lua_setfield(L, -2, "version"); // settings M 3185 lua_setfield( L, -2, "version"); // settings M
3190 3186
3191 lua_pushinteger(L, THREAD_PRIO_MAX); // settings M THREAD_PRIO_MAX 3187 lua_pushinteger(L, THREAD_PRIO_MAX); // settings M THREAD_PRIO_MAX
3192 lua_setfield(L, -2, "max_prio"); // settings M 3188 lua_setfield( L, -2, "max_prio"); // settings M
3193 3189
3194 lua_pushlightuserdata( L, CANCEL_ERROR); // settings M CANCEL_ERROR 3190 lua_pushlightuserdata( L, CANCEL_ERROR); // settings M CANCEL_ERROR
3195 lua_setfield(L, -2, "cancel_error"); // settings M 3191 lua_setfield( L, -2, "cancel_error"); // settings M
3192
3193 // we'll need this every time we transfer some C function from/to this state
3194 lua_newtable( L);
3195 lua_setfield( L, LUA_REGISTRYINDEX, LOOKUP_REGKEY);
3196 3196
3197 // register all native functions found in that module in the transferable functions database 3197 // register all native functions found in that module in the transferable functions database
3198 // we process it before _G because we don't want to find the module when scanning _G (this would generate longer names) 3198 // we process it before _G because we don't want to find the module when scanning _G (this would generate longer names)