summaryrefslogtreecommitdiff
path: root/src/lj_lex.c
diff options
context:
space:
mode:
authorMike Pall <mike>2011-04-06 01:31:21 +0200
committerMike Pall <mike>2011-04-06 01:31:21 +0200
commitee644872e3d60852cdb7f73766dc4e303b28e708 (patch)
tree3b5deadca6bc2eea75b87df6f4e9089b7b38fb28 /src/lj_lex.c
parent734e96fa054912b44cd810ab81ec61320e5dc3d3 (diff)
downloadluajit-ee644872e3d60852cdb7f73766dc4e303b28e708.tar.gz
luajit-ee644872e3d60852cdb7f73766dc4e303b28e708.tar.bz2
luajit-ee644872e3d60852cdb7f73766dc4e303b28e708.zip
FFI: Register the FFI library as a loaded module in luaopen_ffi().
Allows loading it on startup like other libraries in lib_init.c.
Diffstat (limited to 'src/lj_lex.c')
-rw-r--r--src/lj_lex.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/lj_lex.c b/src/lj_lex.c
index bc029761..acfcb921 100644
--- a/src/lj_lex.c
+++ b/src/lj_lex.c
@@ -89,14 +89,7 @@ static void inclinenumber(LexState *ls)
89static void lex_loadffi(lua_State *L) 89static void lex_loadffi(lua_State *L)
90{ 90{
91 ptrdiff_t oldtop = savestack(L, L->top); 91 ptrdiff_t oldtop = savestack(L, L->top);
92 cTValue *tmp;
93 luaopen_ffi(L); 92 luaopen_ffi(L);
94 tmp = lj_tab_getstr(tabV(registry(L)), lj_str_newlit(L, "_LOADED"));
95 if (tmp && tvistab(tmp)) {
96 GCtab *t = tabV(tmp);
97 copyTV(L, lj_tab_setstr(L, t, lj_str_newlit(L, "ffi")), L->top-1);
98 lj_gc_anybarriert(L, t);
99 }
100 L->top = restorestack(L, oldtop); 93 L->top = restorestack(L, oldtop);
101} 94}
102 95