private void PreloadAPI(LuaAPI api) { api.Init(m_machine); m_machine.DoString(string.Format(@" local g = _G local api = g[ ""{0}"" ] package.preload[ ""{0}"" ] = function() g[ ""{0}"" ] = api return api end g[ ""{0}"" ] = nil " , api.Name), "=LuaCPUDevice.PreloadAPI"); }
public LuaEnv() { L = LuaAPI.Init(); LuaCallback.Register(); AddResearchPath(); }
private void InstallAPI(LuaAPI api) { api.Init(m_machine); }