mirror of
https://gitcode.com/JianFeeeee/LuaCangjia_api.git
synced 2026-09-20 00:48:47 +00:00
初始化仓库
This commit is contained in:
17
src/main.cj
Normal file
17
src/main.cj
Normal file
@ -0,0 +1,17 @@
|
||||
@FFI("LuaCangjie_api")
|
||||
|
||||
@C
|
||||
struct lua_runner {
|
||||
|
||||
}
|
||||
|
||||
foreign func init_lua_runner(self:CPointer<lua_runner>,pathio:CString,pkgpath:CString,io_input:CFunc<() -> Int32>,io_output:CFunc<() -> Int32>):Int32
|
||||
foreign func get_errno():Int32
|
||||
foreign func getresult(runner:CPointer<lua_runner>):CString
|
||||
foreign func run(self:CPointer<lua_runner>,path:CString,arg:CString):Int32
|
||||
|
||||
main(): Int64 {
|
||||
var runnr = lua_runner
|
||||
println("hello world")
|
||||
return 0
|
||||
}
|
||||
Reference in New Issue
Block a user