]> jfr.im git - irc/quakenet/newserv.git/blobdiff - lua/lua.h
fix makefile of jupe module
[irc/quakenet/newserv.git] / lua / lua.h
index c4c0e97ff96425a9bedc3a8c0cc0639de7f84874..81ff0bfcc37fdb344fcee635cff3b61ad48812a1 100644 (file)
--- a/lua/lua.h
+++ b/lua/lua.h
@@ -5,7 +5,9 @@
 #ifndef _LUA_H
 #define _LUA_H
 
+#ifndef __USE_BSD
 #define __USE_BSD
+#endif
 
 #include <lua.h>
 #include <lauxlib.h>
 #include <unistd.h>
 
 #include "../lib/sstring.h"
+#include "../core/nsmalloc.h"
 
 #include "lualocal.h"
 #include "luasocket.h"
 
+#define luamalloc(x) nsmalloc(POOL_LUA, x)
+#define luarealloc(x, y) nsrealloc(POOL_LUA, x, y)
+#define luafree(x) nsfree(POOL_LUA, x)
+
 /*** defines ************************************/
 
-#define LUA_BOTVERSION "1.83"
-#define LUA_CHANFIXBOT "Z"
+#define LUA_BOTVERSION "1.89"
+#define LUA_CHANFIXBOT "D"
 #define LUA_OPERCHAN "#twilightzone"
 
 #ifndef LUA_PUKECHAN
@@ -43,7 +50,8 @@
 #define LUA_AUXVERSION ""
 #endif
 
-#define LUA_FULLVERSION "Lua engine v" LUA_BOTVERSION " (" LUA_VERSION LUA_AUXVERSION ")"
+#define LUA_SMALLVERSION "v" LUA_BOTVERSION " (" LUA_VERSION LUA_AUXVERSION ")"
+#define LUA_FULLVERSION "Lua engine " LUA_SMALLVERSION
 
 /*** end defines ************************************/
 
@@ -62,7 +70,7 @@ typedef struct lua_list {
 
 #define LUA_ENDLOOP() } }
 
-#define LUA_PATHLEN 1024
+#define LUA_PATHLEN 150
 
 extern lua_list *lua_head;
 extern sstring *cpath;
@@ -81,6 +89,9 @@ int lua_lineok(const char *data);
 #define lua_tolong(l, n) (long)lua_tonumber(l, n)
 #define lua_islong(l, n) lua_isnumber(l, n)
 #define lua_pushlong(l, n) lua_pushnumber(l, n)
+#define lua_pushnumeric(l, n) lua_pushlong(l, n)
+#define lua_tonumeric(l, n) lua_tolong(l, n)
+#define lua_isnumeric(l, n) lua_islong(l, n)
 
 extern struct rusage r_usages;
 extern struct rusage r_usagee;
@@ -102,27 +113,11 @@ extern struct rusage r_usagee;
 
 #ifdef LUA_DEBUGSOCKET
 
-void lua_debugoutput(char *p, ...);
+void lua_debugoutput(char *p, ...) __attribute__ ((format (printf, 1, 2)));
 #define DEBUGOUT(p, ...) lua_debugoutput(p , ##__VA_ARGS__)
 
 #endif
 
-#ifndef INLINE
-
-#ifdef __GNUC__
-#define INLINE __attribute((always_inline)) inline
-#endif
-
-#ifdef _MSC_VER
-#define INLINE __forceinline
-#endif
-
-#ifndef INLINE
-#define INLINE inline
-#endif
-
-#endif /* INLINE */
-
-INLINE int lua_debugpcall(lua_State *l, char *message, int a, int b, int c);
+int lua_debugpcall(lua_State *l, char *message, int a, int b, int c);
 
 #endif