diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/LuaJIT-1.1.7/etc/README | 20 | ||||
-rw-r--r-- | libraries/LuaJIT-1.1.7/etc/lua.hpp | 9 | ||||
-rw-r--r-- | libraries/LuaJIT-1.1.7/etc/luajit.ico | bin | 0 -> 1078 bytes | |||
-rw-r--r-- | libraries/LuaJIT-1.1.7/etc/luajit.pc | 28 | ||||
-rwxr-xr-x | libraries/LuaJIT-1.1.7/etc/luavs.bat | 22 | ||||
-rw-r--r-- | libraries/LuaJIT-1.1.7/etc/strict.lua | 41 |
6 files changed, 120 insertions, 0 deletions
diff --git a/libraries/LuaJIT-1.1.7/etc/README b/libraries/LuaJIT-1.1.7/etc/README new file mode 100644 index 0000000..98117d0 --- /dev/null +++ b/libraries/LuaJIT-1.1.7/etc/README | |||
@@ -0,0 +1,20 @@ | |||
1 | This directory contains some useful files and code. | ||
2 | Unlike the code in ../src, everything here is in the public domain. | ||
3 | |||
4 | lua.hpp | ||
5 | Lua header files for C++ using 'extern "C"'. | ||
6 | |||
7 | luajit.ico | ||
8 | A LuaJIT icon for Windows (and web sites: save as favicon.ico). | ||
9 | Lua icon drawn by hand by Markus Gritsch. Modified for LuaJIT. | ||
10 | |||
11 | luajit.pc | ||
12 | pkg-config data for LuaJIT | ||
13 | |||
14 | luavs.bat | ||
15 | Script to build LuaJIT under "Visual Studio .NET Command Prompt". | ||
16 | Run it from the toplevel as etc\luavs.bat. | ||
17 | |||
18 | strict.lua | ||
19 | Traps uses of undeclared global variables. | ||
20 | |||
diff --git a/libraries/LuaJIT-1.1.7/etc/lua.hpp b/libraries/LuaJIT-1.1.7/etc/lua.hpp new file mode 100644 index 0000000..ec417f5 --- /dev/null +++ b/libraries/LuaJIT-1.1.7/etc/lua.hpp | |||
@@ -0,0 +1,9 @@ | |||
1 | // lua.hpp | ||
2 | // Lua header files for C++ | ||
3 | // <<extern "C">> not supplied automatically because Lua also compiles as C++ | ||
4 | |||
5 | extern "C" { | ||
6 | #include "lua.h" | ||
7 | #include "lualib.h" | ||
8 | #include "lauxlib.h" | ||
9 | } | ||
diff --git a/libraries/LuaJIT-1.1.7/etc/luajit.ico b/libraries/LuaJIT-1.1.7/etc/luajit.ico new file mode 100644 index 0000000..bdd7a90 --- /dev/null +++ b/libraries/LuaJIT-1.1.7/etc/luajit.ico | |||
Binary files differ | |||
diff --git a/libraries/LuaJIT-1.1.7/etc/luajit.pc b/libraries/LuaJIT-1.1.7/etc/luajit.pc new file mode 100644 index 0000000..1444076 --- /dev/null +++ b/libraries/LuaJIT-1.1.7/etc/luajit.pc | |||
@@ -0,0 +1,28 @@ | |||
1 | # luajit.pc -- pkg-config data for LuaJIT | ||
2 | |||
3 | # vars from install Makefile | ||
4 | |||
5 | # grep '^J*V=' ../Makefile | ||
6 | V= 5.1 | ||
7 | JV= 1.1.7 | ||
8 | |||
9 | # grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/' | ||
10 | prefix= /usr/local | ||
11 | INSTALL_BIN= ${prefix}/bin | ||
12 | INSTALL_INC= ${prefix}/include | ||
13 | INSTALL_LIB= ${prefix}/lib | ||
14 | INSTALL_MAN= ${prefix}/man/man1 | ||
15 | INSTALL_LMOD= ${prefix}/share/lua/${V} | ||
16 | INSTALL_CMOD= ${prefix}/lib/lua/${V} | ||
17 | |||
18 | exec_prefix=${prefix} | ||
19 | libdir=${exec_prefix}/lib | ||
20 | includedir=${prefix}/include | ||
21 | |||
22 | Name: LuaJIT | ||
23 | Description: An Extensible Extension Language (JIT compiled for speed) | ||
24 | Version: ${JV} | ||
25 | Requires: | ||
26 | Libs: -L${libdir} -llua -lm | ||
27 | Cflags: -I${includedir} | ||
28 | |||
diff --git a/libraries/LuaJIT-1.1.7/etc/luavs.bat b/libraries/LuaJIT-1.1.7/etc/luavs.bat new file mode 100755 index 0000000..4f311e2 --- /dev/null +++ b/libraries/LuaJIT-1.1.7/etc/luavs.bat | |||
@@ -0,0 +1,22 @@ | |||
1 | @rem Script to build LuaJIT under "Visual Studio .NET Command Prompt". | ||
2 | @rem Do not run from this directory; run it from the toplevel: etc\luavs.bat . | ||
3 | @rem It creates lua51.dll, lua51.lib and luajit.exe in src. | ||
4 | @rem (contributed by David Manura and Mike Pall) | ||
5 | |||
6 | @setlocal | ||
7 | @set MYCOMPILE=cl /nologo /MD /O2 /W3 /c /D_CRT_SECURE_NO_DEPRECATE /I . /I ..\dynasm | ||
8 | @set MYLINK=link /nologo | ||
9 | @set MYMT=mt /nologo | ||
10 | |||
11 | cd src | ||
12 | %MYCOMPILE% /DLUA_BUILD_AS_DLL l*.c | ||
13 | del lua.obj luac.obj | ||
14 | %MYLINK% /DLL /out:lua51.dll l*.obj | ||
15 | if exist lua51.dll.manifest^ | ||
16 | %MYMT% -manifest lua51.dll.manifest -outputresource:lua51.dll;2 | ||
17 | %MYCOMPILE% /DLUA_BUILD_AS_DLL lua.c | ||
18 | %MYLINK% /out:luajit.exe lua.obj lua51.lib | ||
19 | if exist luajit.exe.manifest^ | ||
20 | %MYMT% -manifest luajit.exe.manifest -outputresource:luajit.exe | ||
21 | del *.obj *.manifest | ||
22 | cd .. | ||
diff --git a/libraries/LuaJIT-1.1.7/etc/strict.lua b/libraries/LuaJIT-1.1.7/etc/strict.lua new file mode 100644 index 0000000..604619d --- /dev/null +++ b/libraries/LuaJIT-1.1.7/etc/strict.lua | |||
@@ -0,0 +1,41 @@ | |||
1 | -- | ||
2 | -- strict.lua | ||
3 | -- checks uses of undeclared global variables | ||
4 | -- All global variables must be 'declared' through a regular assignment | ||
5 | -- (even assigning nil will do) in a main chunk before being used | ||
6 | -- anywhere or assigned to inside a function. | ||
7 | -- | ||
8 | |||
9 | local getinfo, error, rawset, rawget = debug.getinfo, error, rawset, rawget | ||
10 | |||
11 | local mt = getmetatable(_G) | ||
12 | if mt == nil then | ||
13 | mt = {} | ||
14 | setmetatable(_G, mt) | ||
15 | end | ||
16 | |||
17 | mt.__declared = {} | ||
18 | |||
19 | local function what () | ||
20 | local d = getinfo(3, "S") | ||
21 | return d and d.what or "C" | ||
22 | end | ||
23 | |||
24 | mt.__newindex = function (t, n, v) | ||
25 | if not mt.__declared[n] then | ||
26 | local w = what() | ||
27 | if w ~= "main" and w ~= "C" then | ||
28 | error("assign to undeclared variable '"..n.."'", 2) | ||
29 | end | ||
30 | mt.__declared[n] = true | ||
31 | end | ||
32 | rawset(t, n, v) | ||
33 | end | ||
34 | |||
35 | mt.__index = function (t, n) | ||
36 | if not mt.__declared[n] and what() ~= "C" then | ||
37 | error("variable '"..n.."' is not declared", 2) | ||
38 | end | ||
39 | return rawget(t, n) | ||
40 | end | ||
41 | |||