初始化仓库

This commit is contained in:
2026-03-18 16:20:46 +08:00
parent 8ebf63008e
commit 20221fac5f
79 changed files with 35257 additions and 0 deletions

32
lib/test1.c Normal file
View File

@ -0,0 +1,32 @@
#include "lua_cj_api.h"
#include <stdlib.h>
#include <errno.h>
#include <stdio.h>
int hello()
{
printf("hellow\n");
return 0;
}
int main()
{
redirectfuncs re;
re.io_input = &hello;
re.io_output = &hello;
void *lua_run = init_lua_runner("path",NULL,hello,hello);
if(lua_run == NULL)
{
printf("%d",errno);
}
if(run(lua_run,"test.lua","path")==-1)
printf("%d",errno);
lua_runner *runner = (lua_runner*)lua_run;
printf("%s",runner->result);
cleanup(lua_run);
free_lua(lua_run);
}