@@ -1070,17 +1070,11 @@ static int L_CallPlugin (lua_State *L)
1070
1070
break ;
1071
1071
1072
1072
case LUA_TBOOLEAN:
1073
- {
1074
- int b = lua_toboolean (L, i);
1075
- lua_pushboolean (pL, b);
1076
- }
1073
+ lua_pushboolean (pL, lua_toboolean (L, i));
1077
1074
break ;
1078
1075
1079
1076
case LUA_TNUMBER:
1080
- {
1081
- double num = lua_tonumber (L, i);
1082
- lua_pushnumber (pL, num);
1083
- }
1077
+ lua_pushnumber (pL, lua_tonumber (L, i));
1084
1078
break ;
1085
1079
1086
1080
case LUA_TSTRING:
@@ -1097,7 +1091,7 @@ static int L_CallPlugin (lua_State *L)
1097
1091
lua_pushnumber (L, eBadParameter);
1098
1092
CString strError = TFormat (" Cannot pass argument #%i (%s type) to CallPlugin" ,
1099
1093
i,
1100
- lua_typename (L, lua_type (L, i) ));
1094
+ luaL_typename (L, i ));
1101
1095
lua_pushstring (L, strError);
1102
1096
return 2 ; // eBadParameter, explanation
1103
1097
@@ -1196,17 +1190,11 @@ static int L_CallPlugin (lua_State *L)
1196
1190
break ;
1197
1191
1198
1192
case LUA_TBOOLEAN:
1199
- {
1200
- int b = lua_toboolean (pL, i);
1201
- lua_pushboolean (L, b);
1202
- }
1193
+ lua_pushboolean (L, lua_toboolean (pL, i));
1203
1194
break ;
1204
1195
1205
1196
case LUA_TNUMBER:
1206
- {
1207
- double num = lua_tonumber (pL, i);
1208
- lua_pushnumber (L, num);
1209
- }
1197
+ lua_pushnumber (L, lua_tonumber (pL, i));
1210
1198
break ;
1211
1199
1212
1200
case LUA_TSTRING:
@@ -1222,7 +1210,7 @@ static int L_CallPlugin (lua_State *L)
1222
1210
lua_pushnumber (L, eErrorCallingPluginRoutine);
1223
1211
CString strError = CFormat (" Cannot handle return value #%i (%s type) from function '%s' in plugin '%s' (%s)" ,
1224
1212
i,
1225
- lua_typename (pL, lua_type (pL, i) ),
1213
+ luaL_typename (pL, i ),
1226
1214
sRoutine ,
1227
1215
(LPCTSTR) pPlugin->m_strName ,
1228
1216
sPluginID );
0 commit comments