aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ldo.h2
-rw-r--r--src/lfunc.h2
-rw-r--r--src/lmem.h4
-rw-r--r--src/lstring.h2
-rw-r--r--src/lua5.1.pc.in17
-rw-r--r--src/luac.c1
-rw-r--r--src/luaconf.h.in (renamed from src/luaconf.h)12
-rw-r--r--src/lundump.h2
8 files changed, 26 insertions, 16 deletions
diff --git a/src/ldo.h b/src/ldo.h
index 98fddac..bb56360 100644
--- a/src/ldo.h
+++ b/src/ldo.h
@@ -46,7 +46,7 @@ LUAI_FUNC int luaD_pcall (lua_State *L, Pfunc func, void *u,
LUAI_FUNC int luaD_poscall (lua_State *L, StkId firstResult);
LUAI_FUNC void luaD_reallocCI (lua_State *L, int newsize);
LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize);
-LUAI_FUNC void luaD_growstack (lua_State *L, int n);
+void luaD_growstack (lua_State *L, int n);
LUAI_FUNC void luaD_throw (lua_State *L, int errcode);
LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud);
diff --git a/src/lfunc.h b/src/lfunc.h
index a68cf51..475edaf 100644
--- a/src/lfunc.h
+++ b/src/lfunc.h
@@ -18,7 +18,7 @@
cast(int, sizeof(TValue *)*((n)-1)))
-LUAI_FUNC Proto *luaF_newproto (lua_State *L);
+Proto *luaF_newproto (lua_State *L);
LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems, Table *e);
LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, int nelems, Table *e);
LUAI_FUNC UpVal *luaF_newupval (lua_State *L);
diff --git a/src/lmem.h b/src/lmem.h
index 7c2dcb3..96575bc 100644
--- a/src/lmem.h
+++ b/src/lmem.h
@@ -38,9 +38,9 @@
((v)=cast(t *, luaM_reallocv(L, v, oldn, n, sizeof(t))))
-LUAI_FUNC void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize,
+void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize,
size_t size);
-LUAI_FUNC void *luaM_toobig (lua_State *L);
+void *luaM_toobig (lua_State *L);
LUAI_FUNC void *luaM_growaux_ (lua_State *L, void *block, int *size,
size_t size_elem, int limit,
const char *errormsg);
diff --git a/src/lstring.h b/src/lstring.h
index 73a2ff8..70fd8e4 100644
--- a/src/lstring.h
+++ b/src/lstring.h
@@ -25,7 +25,7 @@
LUAI_FUNC void luaS_resize (lua_State *L, int newsize);
LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e);
-LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l);
+TString *luaS_newlstr (lua_State *L, const char *str, size_t l);
#endif
diff --git a/src/lua5.1.pc.in b/src/lua5.1.pc.in
new file mode 100644
index 0000000..9b5bec8
--- /dev/null
+++ b/src/lua5.1.pc.in
@@ -0,0 +1,17 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@/lua5.1
+datarootdir=@datarootdir@
+datadir=@datadir@
+
+Name: Lua
+Description: An Extensible Extension Language
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -llua5.1
+Libs.private: @LIBM@ @LIBS@
+Cflags: -I${includedir}
+
+# information required by lua-utils.eclass::_lua_export
+INSTALL_LMOD=${datadir}/lua/5.1
+INSTALL_CMOD=${libdir}/lua/5.1
diff --git a/src/luac.c b/src/luac.c
index d070173..86474c2 100644
--- a/src/luac.c
+++ b/src/luac.c
@@ -169,7 +169,6 @@ static int pmain(lua_State* L)
if (luaL_loadfile(L,filename)!=0) fatal(lua_tostring(L,-1));
}
f=combine(L,argc);
- if (listing) luaU_print(f,listing>1);
if (dumping)
{
FILE* D= (output==NULL) ? stdout : fopen(output,"wb");
diff --git a/src/luaconf.h b/src/luaconf.h.in
index e2cb261..0947b47 100644
--- a/src/luaconf.h
+++ b/src/luaconf.h.in
@@ -36,7 +36,6 @@
#if defined(LUA_USE_LINUX)
#define LUA_USE_POSIX
#define LUA_USE_DLOPEN /* needs an extra library: -ldl */
-#define LUA_USE_READLINE /* needs some extra libraries */
#endif
#if defined(LUA_USE_MACOSX)
@@ -94,9 +93,9 @@
".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
#else
-#define LUA_ROOT "/usr/local/"
-#define LUA_LDIR LUA_ROOT "share/lua/5.1/"
-#define LUA_CDIR LUA_ROOT "lib/lua/5.1/"
+#define LUA_ROOT "@prefix@/"
+#define LUA_LDIR "@datadir@/lua/5.1/"
+#define LUA_CDIR "@libdir@/lua/5.1/"
#define LUA_PATH_DEFAULT \
"./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \
LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua"
@@ -333,14 +332,12 @@
** CHANGE it to undefined as soon as your programs use only '...' to
** access vararg parameters (instead of the old 'arg' table).
*/
-#define LUA_COMPAT_VARARG
/*
@@ LUA_COMPAT_MOD controls compatibility with old math.mod function.
** CHANGE it to undefined as soon as your programs use 'math.fmod' or
** the new '%' operator instead of 'math.mod'.
*/
-#define LUA_COMPAT_MOD
/*
@@ LUA_COMPAT_LSTR controls compatibility with old long string nesting
@@ -348,14 +345,12 @@
** CHANGE it to 2 if you want the old behaviour, or undefine it to turn
** off the advisory error when nesting [[...]].
*/
-#define LUA_COMPAT_LSTR 1
/*
@@ LUA_COMPAT_GFIND controls compatibility with old 'string.gfind' name.
** CHANGE it to undefined as soon as you rename 'string.gfind' to
** 'string.gmatch'.
*/
-#define LUA_COMPAT_GFIND
/*
@@ LUA_COMPAT_OPENLIB controls compatibility with old 'luaL_openlib'
@@ -363,7 +358,6 @@
** CHANGE it to undefined as soon as you replace to 'luaL_register'
** your uses of 'luaL_openlib'
*/
-#define LUA_COMPAT_OPENLIB
diff --git a/src/lundump.h b/src/lundump.h
index c80189d..cb8376c 100644
--- a/src/lundump.h
+++ b/src/lundump.h
@@ -17,7 +17,7 @@ LUAI_FUNC Proto* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* n
LUAI_FUNC void luaU_header (char* h);
/* dump one chunk; from ldump.c */
-LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip);
+int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip);
#ifdef luac_c
/* print one chunk; from print.c */