File bind/bind.h artifact 9c4f9e0a4b part of check-in b4009ca1bd
#pragma once
#include <lua.h>
#include <lauxlib.h>
#include <stddef.h>
#include <stdbool.h>
#include <stdint.h>
#define _luafn(name) static int LX_##name (lua_State* l)
#define _export(name) lua_pushcfunction(l, LX_##name), lua_setfield(l, -2, #name);
#define _luaret_bool(b) {lua_pushboolean(l, b); return 1;}
#define _luaAPI(mod, ...) int luaopen_bind_##mod (lua_State* l) { \
lua_newtable(l); \
__VA_ARGS__; \
return 1; \
}
/* this comment serves only to unfuck a GCC bug */