aboutsummaryrefslogtreecommitdiff
path: root/src/lj_ctype.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_ctype.h')
-rw-r--r--src/lj_ctype.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lj_ctype.h b/src/lj_ctype.h
index 49ec71da..9589ef2a 100644
--- a/src/lj_ctype.h
+++ b/src/lj_ctype.h
@@ -389,6 +389,16 @@ static LJ_AINLINE CTState *ctype_cts(lua_State *L)
389 return cts; 389 return cts;
390} 390}
391 391
392/* Load FFI library on-demand. */
393#define ctype_loadffi(L) \
394 do { \
395 if (!ctype_ctsG(G(L))) { \
396 ptrdiff_t oldtop = (char *)L->top - mref(L->stack, char); \
397 luaopen_ffi(L); \
398 L->top = (TValue *)(mref(L->stack, char) + oldtop); \
399 } \
400 } while (0)
401
392/* Save and restore state of C type table. */ 402/* Save and restore state of C type table. */
393#define LJ_CTYPE_SAVE(cts) CTState savects_ = *(cts) 403#define LJ_CTYPE_SAVE(cts) CTState savects_ = *(cts)
394#define LJ_CTYPE_RESTORE(cts) \ 404#define LJ_CTYPE_RESTORE(cts) \