首次提交

This commit is contained in:
a158
2026-03-31 16:00:38 +08:00
parent b61b466f82
commit bcc8ee91cd
14 changed files with 889 additions and 0 deletions

106
target/fastweb.lua Normal file
View File

@@ -0,0 +1,106 @@
-- fastweb.lua
local fastweb = {}
--[[
生成软件唯一GUID
@return 返回唯一GUID字符串
]]
function fastweb.make_software_guid()
return fw_make_software_guid()
end
--[[
接管打印
@param args 可变参数
]]
function fastweb.print(...)
fw_print(...)
end
--[[
置全局指针
@param name 名称
@param ptr 指针
@return 是否成功设置
]]
function fastweb.set_ptr(name, ptr)
return fw_set_ptr(name, ptr)
end
--[[
置全局文本
@param name 名称
@param value 文本值
]]
function fastweb.set_str(name, value)
fw_set_str(name, value)
end
--[[
取全局文本
@param name 名称
@return 返回全局文本值
]]
function fastweb.get_str(name)
return fw_get_str(name)
end
--[[
抛出异常
@param msg 异常信息
]]
function fastweb.throw_string(msg)
fw_throw_string(msg)
end
--[[
网站目录
@return 返回网站目录路径
]]
function fastweb.website_dir()
return fw_website_dir()
end
--[[
取当前毫秒时间戳
]]
function fastweb.now_msec()
return fw_now_msec()
end
--[[
取当前秒时间戳
]]
function fastweb.now_sec()
return fw_now_sec()
end
--[[
创建LUA虚拟机环境
param lua_filepath LUA路径
]]
function fastweb.create_env(lua_filepath)
return fw_create_env(lua_filepath)
end
--[[
睡眠
]]
function fastweb.sleep_msec(msec)
fw_sleep_msec(msec)
end
--[[
取当前毫秒时间戳
]]
function fastweb.now_msec()
return fw_now_msec()
end
--[[
转INT
]]
function fastweb.toint(obj)
return fw_toint(obj)
end
return fastweb