Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Load standard Lua libraries upon startup

  • Loading branch information...
commit fc3762ae716f87daa57800da0e25d661deac480b 1 parent 5caa8b4
@jspahrsummers authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 header.ll
View
5 header.ll
@@ -27,6 +27,9 @@ declare void @lua_getfield (%lua_State*, i32, i8*)
declare void @lua_call (%lua_State*, i32, i32)
%lua_call_fp = type void (%lua_State*, i32, i32)*
+declare void @luaL_openlibs (%lua_State*)
+%luaL_openlibs_fp = type void (%lua_State*)*
+
@globalState = private unnamed_addr global %lua_State* null
%pop_fp = type void (%lua_State*, i32)*
@@ -48,4 +51,6 @@ entry:
%state = call %luaL_newstate_fp @luaL_newstate ()
store %lua_State* %state, %lua_State** @globalState
+ call %luaL_openlibs_fp @luaL_openlibs (%lua_State* %state)
+
; generated code starts here
Please sign in to comment.
Something went wrong with that request. Please try again.