aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Melnichuk <alexeymelnichuck@gmail.com>2016-09-05 16:27:39 +0300
committerAlexey Melnichuk <alexeymelnichuck@gmail.com>2016-09-05 16:27:39 +0300
commit0e4d2aab4c13e07f79a03d3870b5af2ba79a0662 (patch)
tree27c056ad25b232bbd8590012fcc63666d85f4307
parent0f961dd2ace7027ad238a193f301b8fa7dc12d56 (diff)
downloadlua-llthreads2-0e4d2aab4c13e07f79a03d3870b5af2ba79a0662.tar.gz
lua-llthreads2-0e4d2aab4c13e07f79a03d3870b5af2ba79a0662.tar.bz2
lua-llthreads2-0e4d2aab4c13e07f79a03d3870b5af2ba79a0662.zip
Fix. Pass integer argument to thread.
-rw-r--r--src/copy.inc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/copy.inc b/src/copy.inc
index 21ba261..d9f7e86 100644
--- a/src/copy.inc
+++ b/src/copy.inc
@@ -77,6 +77,11 @@ static int llthread_copy_value(llthread_copy_state *state, int depth, int idx) {
77 lua_pushnil(state->to_L); 77 lua_pushnil(state->to_L);
78 break; 78 break;
79 case LUA_TNUMBER: 79 case LUA_TNUMBER:
80#if LUA_VERSION_NUM >= 503
81 if(lua_isinteger(state->from_L, idx))
82 lua_pushinteger(state->to_L, lua_tointeger(state->from_L, idx));
83 else
84#endif
80 lua_pushnumber(state->to_L, lua_tonumber(state->from_L, idx)); 85 lua_pushnumber(state->to_L, lua_tonumber(state->from_L, idx));
81 break; 86 break;
82 case LUA_TBOOLEAN: 87 case LUA_TBOOLEAN: