Skip to content

Commit 33334e4

Browse files
committed
build lua jit.
Signed-off-by: zqzjz0911 <[email protected]>
1 parent 2d145ee commit 33334e4

File tree

18 files changed

+34
-58
lines changed

18 files changed

+34
-58
lines changed
1 KB
Binary file not shown.
1.37 MB
Binary file not shown.
0 Bytes
Binary file not shown.
907 KB
Binary file not shown.

src/luajit-root-x64/luajit/include/luajit-2.1/lauxlib.h

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
#include "lua.h"
1616

1717

18-
#define luaL_getn(L,i) ((int)lua_objlen(L, i))
19-
#define luaL_setn(L,i,j) ((void)0) /* no op! */
20-
2118
/* extra error code for `luaL_load' */
2219
#define LUA_ERRFILE (LUA_ERRERR+1)
2320

@@ -58,6 +55,10 @@ LUALIB_API int (luaL_error) (lua_State *L, const char *fmt, ...);
5855
LUALIB_API int (luaL_checkoption) (lua_State *L, int narg, const char *def,
5956
const char *const lst[]);
6057

58+
/* pre-defined references */
59+
#define LUA_NOREF (-2)
60+
#define LUA_REFNIL (-1)
61+
6162
LUALIB_API int (luaL_ref) (lua_State *L, int t);
6263
LUALIB_API void (luaL_unref) (lua_State *L, int t, int ref);
6364

@@ -84,6 +85,9 @@ LUALIB_API int (luaL_loadbufferx) (lua_State *L, const char *buff, size_t sz,
8485
const char *name, const char *mode);
8586
LUALIB_API void luaL_traceback (lua_State *L, lua_State *L1, const char *msg,
8687
int level);
88+
LUALIB_API void (luaL_setfuncs) (lua_State *L, const luaL_Reg *l, int nup);
89+
LUALIB_API void (luaL_pushmodule) (lua_State *L, const char *modname,
90+
int sizehint);
8791

8892

8993
/*
@@ -113,6 +117,11 @@ LUALIB_API void luaL_traceback (lua_State *L, lua_State *L1, const char *msg,
113117

114118
#define luaL_opt(L,f,n,d) (lua_isnoneornil(L,(n)) ? (d) : f(L,(n)))
115119

120+
/* From Lua 5.2. */
121+
#define luaL_newlibtable(L, l) \
122+
lua_createtable(L, 0, sizeof(l)/sizeof((l)[0]) - 1)
123+
#define luaL_newlib(L, l) (luaL_newlibtable(L, l), luaL_setfuncs(L, l, 0))
124+
116125
/*
117126
** {======================================================
118127
** Generic Buffer manipulation
@@ -147,21 +156,4 @@ LUALIB_API void (luaL_pushresult) (luaL_Buffer *B);
147156

148157
/* }====================================================== */
149158

150-
151-
/* compatibility with ref system */
152-
153-
/* pre-defined references */
154-
#define LUA_NOREF (-2)
155-
#define LUA_REFNIL (-1)
156-
157-
#define lua_ref(L,lock) ((lock) ? luaL_ref(L, LUA_REGISTRYINDEX) : \
158-
(lua_pushstring(L, "unlocked references are obsolete"), lua_error(L), 0))
159-
160-
#define lua_unref(L,ref) luaL_unref(L, LUA_REGISTRYINDEX, (ref))
161-
162-
#define lua_getref(L,ref) lua_rawgeti(L, LUA_REGISTRYINDEX, (ref))
163-
164-
165-
#define luaL_reg luaL_Reg
166-
167159
#endif

src/luajit-root-x64/luajit/include/luajit-2.1/luaconf.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
** Configuration header.
3-
** Copyright (C) 2005-2016 Mike Pall. See Copyright Notice in luajit.h
3+
** Copyright (C) 2005-2017 Mike Pall. See Copyright Notice in luajit.h
44
*/
55

66
#ifndef luaconf_h
@@ -79,7 +79,7 @@
7979
#define LUA_IGMARK "-"
8080
#define LUA_PATH_CONFIG \
8181
LUA_DIRSEP "\n" LUA_PATHSEP "\n" LUA_PATH_MARK "\n" \
82-
LUA_EXECDIR "\n" LUA_IGMARK
82+
LUA_EXECDIR "\n" LUA_IGMARK "\n"
8383

8484
/* Quoting in error messages. */
8585
#define LUA_QL(x) "'" x "'"
@@ -92,10 +92,6 @@
9292
#define LUAI_GCMUL 200 /* Run GC at 200% of allocation speed. */
9393
#define LUA_MAXCAPTURES 32 /* Max. pattern captures. */
9494

95-
/* Compatibility with older library function names. */
96-
#define LUA_COMPAT_MOD /* OLD: math.mod, NEW: math.fmod */
97-
#define LUA_COMPAT_GFIND /* OLD: string.gfind, NEW: string.gmatch */
98-
9995
/* Configuration for the frontend (the luajit executable). */
10096
#if defined(luajit_c)
10197
#define LUA_PROGNAME "luajit" /* Fallback frontend name. */

src/luajit-root-x64/luajit/include/luajit-2.1/luajit.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
** LuaJIT -- a Just-In-Time Compiler for Lua. http://luajit.org/
33
**
4-
** Copyright (C) 2005-2016 Mike Pall. All rights reserved.
4+
** Copyright (C) 2005-2017 Mike Pall. All rights reserved.
55
**
66
** Permission is hereby granted, free of charge, to any person obtaining
77
** a copy of this software and associated documentation files (the
@@ -33,7 +33,7 @@
3333
#define LUAJIT_VERSION "LuaJIT 2.1.0-beta2"
3434
#define LUAJIT_VERSION_NUM 20100 /* Version 2.1.0 = 02.01.00. */
3535
#define LUAJIT_VERSION_SYM luaJIT_version_2_1_0_beta2
36-
#define LUAJIT_COPYRIGHT "Copyright (C) 2005-2016 Mike Pall"
36+
#define LUAJIT_COPYRIGHT "Copyright (C) 2005-2017 Mike Pall"
3737
#define LUAJIT_URL "http://luajit.org/"
3838

3939
/* Modes for luaJIT_setmode. */

src/luajit-root-x64/luajit/include/luajit-2.1/lualib.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
** Standard library header.
3-
** Copyright (C) 2005-2016 Mike Pall. See Copyright Notice in luajit.h
3+
** Copyright (C) 2005-2017 Mike Pall. See Copyright Notice in luajit.h
44
*/
55

66
#ifndef _LUALIB_H
386 Bytes
Binary file not shown.
1.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)