Rename callistoopen_* functions to luaopen_*

This commit is contained in:
Jeremy Baxter 2023-07-08 18:35:59 +12:00
parent 6918a0de04
commit 941722cb01
11 changed files with 27 additions and 27 deletions

View file

@ -10,15 +10,15 @@
static const luaL_Reg loadedlibs[] = { static const luaL_Reg loadedlibs[] = {
{CALLISTO_CLLIBNAME, callistoopen_cl}, {CALLISTO_CLLIBNAME, luaopen_cl},
{CALLISTO_ENVLIBNAME, callistoopen_environ}, {CALLISTO_ENVLIBNAME, luaopen_environ},
{CALLISTO_EXTLIBNAME, callistoopen_extra}, {CALLISTO_EXTLIBNAME, luaopen_extra},
{CALLISTO_FILELIBNAME, callistoopen_file}, {CALLISTO_FILELIBNAME, luaopen_file},
{CALLISTO_JSONLIBNAME, callistoopen_json}, {CALLISTO_JSONLIBNAME, luaopen_json},
{CALLISTO_MATHLIBNAME, callistoopen_math}, {CALLISTO_MATHLIBNAME, luaopen_math},
{CALLISTO_OSLIBNAME, callistoopen_os}, {CALLISTO_OSLIBNAME, luaopen_os},
{CALLISTO_PROCLIBNAME, callistoopen_process}, {CALLISTO_PROCLIBNAME, luaopen_process},
{CALLISTO_SOCKLIBNAME, callistoopen_socket}, {CALLISTO_SOCKLIBNAME, luaopen_socket},
{NULL, NULL} {NULL, NULL}
}; };

View file

@ -27,15 +27,15 @@
#define CALLISTO_ENVIRON "environ" #define CALLISTO_ENVIRON "environ"
int callistoopen_cl(lua_State *); int luaopen_cl(lua_State *);
int callistoopen_environ(lua_State *); int luaopen_environ(lua_State *);
int callistoopen_extra(lua_State *); int luaopen_extra(lua_State *);
int callistoopen_file(lua_State *); int luaopen_file(lua_State *);
int callistoopen_json(lua_State *); int luaopen_json(lua_State *);
int callistoopen_math(lua_State *); int luaopen_math(lua_State *);
int callistoopen_os(lua_State *); int luaopen_os(lua_State *);
int callistoopen_process(lua_State *); int luaopen_process(lua_State *);
int callistoopen_socket(lua_State *); int luaopen_socket(lua_State *);
lua_State *callisto_newstate(void); lua_State *callisto_newstate(void);
void callisto_openlibs(lua_State *); void callisto_openlibs(lua_State *);

2
lcl.c
View file

@ -291,7 +291,7 @@ static const luaL_Reg cllib[] = {
}; };
int int
callistoopen_cl(lua_State *L) luaopen_cl(lua_State *L)
{ {
luaL_newlib(L, cllib); luaL_newlib(L, cllib);
return 0; return 0;

View file

@ -99,7 +99,7 @@ static const luaL_Reg mt[] = {
}; };
int int
callistoopen_environ(lua_State *L) luaopen_environ(lua_State *L)
{ {
const luaL_Reg *lib; const luaL_Reg *lib;

View file

@ -61,7 +61,7 @@ static const luaL_Reg extlib[] = {
}; };
int int
callistoopen_extra(lua_State *L) luaopen_extra(lua_State *L)
{ {
newoverride(L, extlib, CALLISTO_EXTLIBNAME); newoverride(L, extlib, CALLISTO_EXTLIBNAME);
return 1; return 1;

View file

@ -350,7 +350,7 @@ static const luaL_Reg filelib[] = {
}; };
int int
callistoopen_file(lua_State *L) luaopen_file(lua_State *L)
{ {
luaL_newlib(L, filelib); luaL_newlib(L, filelib);
return 1; return 1;

View file

@ -140,7 +140,7 @@ local t = json.decode(j)
int luaopen_cjson(lua_State *L); int luaopen_cjson(lua_State *L);
int int
callistoopen_json(lua_State *L) luaopen_json(lua_State *L)
{ {
luaopen_cjson(L); luaopen_cjson(L);
return 1; return 1;

View file

@ -41,7 +41,7 @@ static const luaL_Reg mathlib[] = {
}; };
int int
callistoopen_math(lua_State *L) luaopen_math(lua_State *L)
{ {
newoverride(L, mathlib, CALLISTO_MATHLIBNAME); newoverride(L, mathlib, CALLISTO_MATHLIBNAME);
return 0; return 0;

2
los.c
View file

@ -47,7 +47,7 @@ static const luaL_Reg oslib[] = {
}; };
int int
callistoopen_os(lua_State *L) luaopen_os(lua_State *L)
{ {
newoverride(L, oslib, CALLISTO_OSLIBNAME); newoverride(L, oslib, CALLISTO_OSLIBNAME);
return 1; return 1;

View file

@ -285,7 +285,7 @@ static const luaL_Reg proclib[] = {
}; };
int int
callistoopen_process(lua_State *L) luaopen_process(lua_State *L)
{ {
luaL_newlib(L, proclib); luaL_newlib(L, proclib);
return 0; return 0;

View file

@ -17,7 +17,7 @@
int luaopen_socket_core(lua_State *L); int luaopen_socket_core(lua_State *L);
int int
callistoopen_socket(lua_State *L) luaopen_socket(lua_State *L)
{ {
luaopen_socket_core(L); luaopen_socket_core(L);
return 1; return 1;