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> | 2013-09-27 20:34:51 +0200 |
---|---|---|
committer | Benoit Germain <b n t DOT g e r m a i n AT g m a i l DOT c o m> | 2013-09-27 20:34:51 +0200 |
commit | 623a8f48a624510a0461b0893da647e22e08cdd7 (patch) | |
tree | d414e72f4dedb4d196a24a9b0adc8c4393bbd46c /src/tools.c | |
parent | f823c6887e28c815234f8b4bd355887b4f554857 (diff) | |
download | lanes-623a8f48a624510a0461b0893da647e22e08cdd7.tar.gz lanes-623a8f48a624510a0461b0893da647e22e08cdd7.tar.bz2 lanes-623a8f48a624510a0461b0893da647e22e08cdd7.zip |
version 3.6.6
no longer call core.configure with dummy params when requiring lanes
more than once (fixes potential multithreading issues with LuaJIT
allocator)
activated EnableCrashingOnCrashes() Win32 debug builds
fixed some comments in code
Diffstat (limited to 'src/tools.c')
-rw-r--r-- | src/tools.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tools.c b/src/tools.c index a957f41..49194d0 100644 --- a/src/tools.c +++ b/src/tools.c | |||
@@ -1461,12 +1461,12 @@ static void lookup_native_func( lua_State* L2, lua_State* L, uint_t i, enum eLoo | |||
1461 | { | 1461 | { |
1462 | char const* fqn; // L // L2 | 1462 | char const* fqn; // L // L2 |
1463 | size_t len; | 1463 | size_t len; |
1464 | _ASSERT_L( L, lua_isfunction( L, i)); // ... f ... | 1464 | ASSERT_L( lua_isfunction( L, i)); // ... f ... |
1465 | STACK_CHECK( L); | 1465 | STACK_CHECK( L); |
1466 | if( mode_ == eLM_FromKeeper) | 1466 | if( mode_ == eLM_FromKeeper) |
1467 | { | 1467 | { |
1468 | lua_CFunction f = lua_tocfunction( L, i); // should *always* be sentinelfunc! | 1468 | lua_CFunction f = lua_tocfunction( L, i); // should *always* be sentinelfunc! |
1469 | _ASSERT_L( L, f == sentinelfunc); | 1469 | ASSERT_L( f == sentinelfunc); |
1470 | lua_getupvalue( L, i, 1); // ... f ... "f.q.n" | 1470 | lua_getupvalue( L, i, 1); // ... f ... "f.q.n" |
1471 | fqn = lua_tolstring( L, -1, &len); | 1471 | fqn = lua_tolstring( L, -1, &len); |
1472 | } | 1472 | } |
@@ -1474,7 +1474,7 @@ static void lookup_native_func( lua_State* L2, lua_State* L, uint_t i, enum eLoo | |||
1474 | { | 1474 | { |
1475 | // fetch the name from the source state's lookup table | 1475 | // fetch the name from the source state's lookup table |
1476 | lua_getfield( L, LUA_REGISTRYINDEX, LOOKUP_KEY); // ... f ... {} | 1476 | lua_getfield( L, LUA_REGISTRYINDEX, LOOKUP_KEY); // ... f ... {} |
1477 | _ASSERT_L( L, lua_istable( L, -1)); | 1477 | ASSERT_L( lua_istable( L, -1)); |
1478 | lua_pushvalue( L, i); // ... f ... {} f | 1478 | lua_pushvalue( L, i); // ... f ... {} f |
1479 | lua_rawget( L, -2); // ... f ... {} "f.q.n" | 1479 | lua_rawget( L, -2); // ... f ... {} "f.q.n" |
1480 | fqn = lua_tolstring( L, -1, &len); | 1480 | fqn = lua_tolstring( L, -1, &len); |
@@ -1521,7 +1521,7 @@ static void lookup_native_func( lua_State* L2, lua_State* L, uint_t i, enum eLoo | |||
1521 | else | 1521 | else |
1522 | { | 1522 | { |
1523 | lua_getfield( L2, LUA_REGISTRYINDEX, LOOKUP_KEY); // {} | 1523 | lua_getfield( L2, LUA_REGISTRYINDEX, LOOKUP_KEY); // {} |
1524 | _ASSERT_L( L2, lua_istable( L2, -1)); | 1524 | ASSERT_L( lua_istable( L2, -1)); |
1525 | lua_pushlstring( L2, fqn, len); // {} "f.q.n" | 1525 | lua_pushlstring( L2, fqn, len); // {} "f.q.n" |
1526 | lua_rawget( L2, -2); // {} f | 1526 | lua_rawget( L2, -2); // {} f |
1527 | if( !lua_isfunction( L2, -1)) | 1527 | if( !lua_isfunction( L2, -1)) |