mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
Fixed LUA compile
This commit is contained in:
parent
b3382b22d3
commit
022e6c7a5b
8 changed files with 12 additions and 11 deletions
4
3rdparty/lsqlite3/lsqlite3.c
vendored
4
3rdparty/lsqlite3/lsqlite3.c
vendored
|
@ -31,8 +31,8 @@
|
|||
#include <assert.h>
|
||||
|
||||
#define LUA_LIB
|
||||
#include "lua/lua.h"
|
||||
#include "lua/lauxlib.h"
|
||||
#include "lua.h"
|
||||
#include "lauxlib.h"
|
||||
|
||||
#if LUA_VERSION_NUM > 501
|
||||
//
|
||||
|
|
2
3rdparty/lua/src/liolib.c
vendored
2
3rdparty/lua/src/liolib.c
vendored
|
@ -556,7 +556,7 @@ static int f_seek (lua_State *L) {
|
|||
if (op)
|
||||
return luaL_fileresult(L, 0, NULL); /* error */
|
||||
else {
|
||||
lua_pushnumber(L, (lua_Number)l_ftell(f));
|
||||
lua_pushnumber(L, (lua_Number)(1.0 * l_ftell(f)));
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
2
3rdparty/lua/src/lobject.c
vendored
2
3rdparty/lua/src/lobject.c
vendored
|
@ -104,7 +104,7 @@ static int isneg (const char **s) {
|
|||
|
||||
static lua_Number readhexa (const char **s, lua_Number r, int *count) {
|
||||
for (; lisxdigit(cast_uchar(**s)); (*s)++) { /* read integer part */
|
||||
r = (r * cast_num(16.0)) + cast_num(luaO_hexavalue(cast_uchar(**s)));
|
||||
r = (r * cast_num(16.0)) + cast_num(1.0*luaO_hexavalue(cast_uchar(**s)));
|
||||
(*count)++;
|
||||
}
|
||||
return r;
|
||||
|
|
8
3rdparty/lua/src/loslib.c
vendored
8
3rdparty/lua/src/loslib.c
vendored
|
@ -120,7 +120,7 @@ static int os_getenv (lua_State *L) {
|
|||
|
||||
|
||||
static int os_clock (lua_State *L) {
|
||||
lua_pushnumber(L, ((lua_Number)clock())/(lua_Number)CLOCKS_PER_SEC);
|
||||
lua_pushnumber(L, ((lua_Number)(1.0*clock()))/(lua_Number)CLOCKS_PER_SEC);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -194,7 +194,7 @@ static const char *checkoption (lua_State *L, const char *conv, char *buff) {
|
|||
|
||||
static int os_date (lua_State *L) {
|
||||
const char *s = luaL_optstring(L, 1, "%c");
|
||||
time_t t = luaL_opt(L, (time_t)luaL_checknumber, 2, time(NULL));
|
||||
time_t t = luaL_opt(L, luaL_checknumber, 2, time(NULL));
|
||||
struct tm tmr, *stm;
|
||||
if (*s == '!') { /* UTC? */
|
||||
stm = l_gmtime(&t, &tmr);
|
||||
|
@ -264,8 +264,8 @@ static int os_time (lua_State *L) {
|
|||
|
||||
|
||||
static int os_difftime (lua_State *L) {
|
||||
lua_pushnumber(L, difftime((time_t)(luaL_checknumber(L, 1)),
|
||||
(time_t)(luaL_optnumber(L, 2, 0))));
|
||||
lua_pushnumber(L, difftime((luaL_checknumber(L, 1)),
|
||||
(luaL_optnumber(L, 2, 0))));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
2
3rdparty/lua/src/lvm.c
vendored
2
3rdparty/lua/src/lvm.c
vendored
|
@ -339,7 +339,7 @@ void luaV_objlen (lua_State *L, StkId ra, const TValue *rb) {
|
|||
Table *h = hvalue(rb);
|
||||
tm = fasttm(L, h->metatable, TM_LEN);
|
||||
if (tm) break; /* metamethod? break switch to call it */
|
||||
setnvalue(ra, cast_num(luaH_getn(h))); /* else primitive len */
|
||||
setnvalue(ra, cast_num(1.0*luaH_getn(h))); /* else primitive len */
|
||||
return;
|
||||
}
|
||||
case LUA_TSTRING: {
|
||||
|
|
1
makefile
1
makefile
|
@ -643,6 +643,7 @@ INCPATH += \
|
|||
-I$(SRC)/lib/util \
|
||||
-I$(SRC)/lib \
|
||||
-I$(3RDPARTY) \
|
||||
-I$(3RDPARTY)/lua/src \
|
||||
-I$(SRC)/osd \
|
||||
-I$(SRC)/osd/$(OSD) \
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
***************************************************************************/
|
||||
|
||||
#include <limits>
|
||||
#include "lua/lua.hpp"
|
||||
#include "lua.hpp"
|
||||
#include "luabridge/Source/LuaBridge/LuaBridge.h"
|
||||
#include <signal.h>
|
||||
#include "emu.h"
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#undef None
|
||||
#endif
|
||||
|
||||
#include "lua/lua.hpp"
|
||||
#include "lua.hpp"
|
||||
#include "luabridge/Source/LuaBridge/LuaBridge.h"
|
||||
|
||||
struct lua_State;
|
||||
|
|
Loading…
Reference in a new issue