Skip to content
Discussion options

You must be logged in to vote

If you use Luau in your own software, you can try using original liolib.c from Lua 5.1 with a few changes like adding missing defines/functions:

#define LUA_FILEHANDLE		"FILE*"
#define LUA_NUMBER_SCAN		"%lf"
#define LUA_NUMBER_FMT		"%.14g"
#define LUAL_BUFFERSIZE		BUFSIZ
#define LUA_IOLIBNAME	"io"

#define lua_popen(L,c,m)	((void)L, _popen(c,m))
#define lua_pclose(L,file)	((void)L, (_pclose(file) != -1))

#define luaL_optlong(L,n,d)	((long)luaL_optinteger(L, (n), (d)))

and by changing code around luaL_addsize.

But we do have plans to add built-in 'liolib.c' in the future.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@4x8Matrix
Comment options

@mundusnine
Comment options

Answer selected by 4x8Matrix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants