Go to the documentation of this file.
32 #ifndef UPB_LUA_UPB_H_
33 #define UPB_LUA_UPB_H_
43 #if LUA_VERSION_NUM == 501
44 #define lua_rawlen lua_objlen
45 #define lua_setuservalue(L, idx) lua_setfenv(L, idx)
46 #define lua_getuservalue(L, idx) lua_getfenv(L, idx)
47 #define lupb_setfuncs(L, l) luaL_register(L, NULL, l)
48 #elif LUA_VERSION_NUM >= 502 && LUA_VERSION_NUM <= 504
49 #define lupb_setfuncs(L, l) luaL_setfuncs(L, l, 0)
51 #error Only Lua 5.1-5.4 are supported
58 #if LUA_VERSION_NUM < 504
113 #define lupb_assert(L, predicate) \
115 luaL_error(L, "internal error: %s, %s:%d ", #predicate, __FILE__, __LINE__);
117 #define LUPB_UNUSED(var) (void)var
119 #if defined(__GNUC__) || defined(__clang__)
120 #define LUPB_UNREACHABLE() \
123 __builtin_unreachable(); \
126 #define LUPB_UNREACHABLE() \
void lupb_checkstatus(lua_State *L, upb_Status *s)
void lupb_pushmsgval(lua_State *L, int container, upb_CType type, upb_MessageValue val)
void lupb_MessageDef_pushsubmsgdef(lua_State *L, const upb_FieldDef *f)
const char * lupb_checkname(lua_State *L, int narg)
int32_t lupb_checkint32(lua_State *L, int narg)
upb_Arena * lupb_Arena_pushnew(lua_State *L)
uint64_t lupb_checkuint64(lua_State *L, int narg)
const upb_EnumDef * lupb_EnumDef_check(lua_State *L, int narg)
upb_DefPool * lupb_DefPool_check(lua_State *L, int narg)
void lupb_pushuint32(lua_State *L, uint32_t val)
void lupb_pushuint64(lua_State *L, uint64_t val)
int lua_getiuservalue(lua_State *L, int index, int n)
int lupb_MessageDef_call(lua_State *L)
void lupb_pushint32(lua_State *L, int32_t val)
void lupb_def_registertypes(lua_State *L)
void lupb_pushint64(lua_State *L, int64_t val)
const char * lupb_checkstring(lua_State *L, int narg, size_t *len)
unsigned __int64 uint64_t
float lupb_checkfloat(lua_State *L, int narg)
int64_t lupb_checkint64(lua_State *L, int narg)
int lua_setiuservalue(lua_State *L, int index, int n)
bool lupb_checkbool(lua_State *L, int narg)
void lupb_msg_registertypes(lua_State *L)
const upb_MessageDef * lupb_MessageDef_check(lua_State *L, int narg)
void lupb_register_type(lua_State *L, const char *name, const luaL_Reg *m, const luaL_Reg *mm)
double lupb_checkdouble(lua_State *L, int narg)
uint32_t lupb_checkuint32(lua_State *L, int narg)
void * lupb_newuserdata(lua_State *L, size_t size, int n, const char *type)
const upb_FieldDef * lupb_FieldDef_check(lua_State *L, int narg)
int luaopen_lupb(lua_State *L)
static struct async_container * container
grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:48