diff options
Diffstat (limited to '')
-rw-r--r-- | src/lj_lib.h | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/lj_lib.h b/src/lj_lib.h index f9377bad..c77c5229 100644 --- a/src/lj_lib.h +++ b/src/lj_lib.h | |||
@@ -59,18 +59,7 @@ LJ_FUNC int lj_lib_checkopt(lua_State *L, int narg, int def, const char *lst); | |||
59 | #define lj_lib_checkfpu(L) UNUSED(L) | 59 | #define lj_lib_checkfpu(L) UNUSED(L) |
60 | #endif | 60 | #endif |
61 | 61 | ||
62 | /* Push internal function on the stack. */ | 62 | LJ_FUNC GCfunc *lj_lib_pushcc(lua_State *L, lua_CFunction f, int id, int n); |
63 | static LJ_AINLINE GCfunc *lj_lib_pushcc(lua_State *L, lua_CFunction f, | ||
64 | int id, int n) | ||
65 | { | ||
66 | GCfunc *fn; | ||
67 | lua_pushcclosure(L, f, n); | ||
68 | fn = funcV(L->top-1); | ||
69 | fn->c.ffid = (uint8_t)id; | ||
70 | setmref(fn->c.pc, &G(L)->bc_cfunc_int); | ||
71 | return fn; | ||
72 | } | ||
73 | |||
74 | #define lj_lib_pushcf(L, fn, id) (lj_lib_pushcc(L, (fn), (id), 0)) | 63 | #define lj_lib_pushcf(L, fn, id) (lj_lib_pushcc(L, (fn), (id), 0)) |
75 | 64 | ||
76 | /* Library function declarations. Scanned by buildvm. */ | 65 | /* Library function declarations. Scanned by buildvm. */ |
@@ -91,6 +80,8 @@ LJ_FUNC void lj_lib_register(lua_State *L, const char *libname, | |||
91 | const uint8_t *init, const lua_CFunction *cf); | 80 | const uint8_t *init, const lua_CFunction *cf); |
92 | LJ_FUNC void lj_lib_prereg(lua_State *L, const char *name, lua_CFunction f, | 81 | LJ_FUNC void lj_lib_prereg(lua_State *L, const char *name, lua_CFunction f, |
93 | GCtab *env); | 82 | GCtab *env); |
83 | LJ_FUNC int lj_lib_postreg(lua_State *L, lua_CFunction cf, int id, | ||
84 | const char *name); | ||
94 | 85 | ||
95 | /* Library init data tags. */ | 86 | /* Library init data tags. */ |
96 | #define LIBINIT_LENMASK 0x3f | 87 | #define LIBINIT_LENMASK 0x3f |