Exposed Lua support functions.

This commit is contained in:
Jurie Horneman committed 2014-03-09 21:11:06 +01:00
1 parent 8dd76e6ef4
commit 1b3a1b74ac
2 files changed
+11 -3

No files matched your search

+3 -3
View File
@@ -3704,19 +3704,19 @@ static void *mmap(void *addr, int64_t len, int prot, int flags, int fd,
#include <sys/mman.h>
#endif
static void reg_string(struct lua_State *L, const char *name, const char *val) {
void reg_string(struct lua_State *L, const char *name, const char *val) {
lua_pushstring(L, name);
lua_pushstring(L, val);
lua_rawset(L, -3);
}
static void reg_int(struct lua_State *L, const char *name, int val) {
void reg_int(struct lua_State *L, const char *name, int val) {
lua_pushstring(L, name);
lua_pushinteger(L, val);
lua_rawset(L, -3);
}
static void reg_function(struct lua_State *L, const char *name,
void reg_function(struct lua_State *L, const char *name,
lua_CFunction func, struct mg_connection *conn) {
lua_pushstring(L, name);
lua_pushlightuserdata(L, conn);