Commit 10f02c63 authored by 神楽坂玲奈's avatar 神楽坂玲奈

fix

parent be72f4b4
......@@ -173,9 +173,9 @@ void interpreter::add_param(void *param, int32 type, bool front) {
}
void interpreter::add_param(int32 param, int32 type, bool front) {
if(front)
params.emplace_front((void*)param, type);
params.emplace_front((size_t)param, type);
else
params.emplace_back((void*)param, type);
params.emplace_back((size_t)param, type);
}
void interpreter::push_param(lua_State* L, bool is_coroutine) {
int32 pushed = 0;
......@@ -184,13 +184,13 @@ void interpreter::push_param(lua_State* L, bool is_coroutine) {
uint32 type = it.second;
switch(type) {
case PARAM_TYPE_INT:
lua_pushinteger(L, (int32) it.first);
lua_pushinteger(L, (size_t) it.first);
break;
case PARAM_TYPE_STRING:
lua_pushstring(L, (const char *) it.first);
break;
case PARAM_TYPE_BOOLEAN:
lua_pushboolean(L, (int32)(ptr)it.first);
lua_pushboolean(L, (size_t)it.first);
break;
case PARAM_TYPE_CARD: {
if (it.first)
......@@ -214,11 +214,11 @@ void interpreter::push_param(lua_State* L, bool is_coroutine) {
break;
}
case PARAM_TYPE_FUNCTION: {
function2value(L, (int32)(ptr)it.first);
function2value(L, (size_t)it.first);
break;
}
case PARAM_TYPE_INDEX: {
int32 index = (int32)(ptr)it.first;
int32 index = (size_t)it.first;
if(index > 0)
lua_pushvalue(L, index);
else if(is_coroutine) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment