about summary refs log tree commit diff stats
path: root/src/lua.c
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-10-24 09:23:54 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-10-24 09:23:54 -0700
commitc80bafed747804da277a0f42d7c2f2a560505da1 (patch)
treeb7960ca7b67ee1e7f8a4a709d28003e9c5c987d0 /src/lua.c
parent36ef0c236ec840ca1ffdd634df9d967b12c8f7d1 (diff)
downloadteliva-c80bafed747804da277a0f42d7c2f2a560505da1.tar.gz
trying to make sense of how bindings are created
lua_State contains these StkId fields (stack, stack_last, base, top)
that expand to a pointer of a struct containing a Lua value and an int.
Unclear how it's used, or how you build a stack out of it.
Diffstat (limited to 'src/lua.c')
-rw-r--r--src/lua.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lua.c b/src/lua.c
index a6bbb2b..88cd29b 100644
--- a/src/lua.c
+++ b/src/lua.c
@@ -371,7 +371,7 @@ static int pmain (lua_State *L) {
 int main (int argc, char **argv) {
   int status;
   struct Smain s;
-  lua_State *L = lua_open();  /* create state */
+  lua_State *L = luaL_newstate();
   if (L == NULL) {
     l_message(argv[0], "cannot create state: not enough memory");
     return EXIT_FAILURE;