On Wednesday, July 9, 2014 11:24:50 PM UTC-5, Yukihiro Nakadaira wrote: > > Here is sample code. > > [edited] > > L = luaL_newstate(); > > lua_pushcclosure(L, add, 0); > lua_pushinteger(L, 111); > lua_pushinteger(L, 222); > lua_call(L, 2 /* nargs */, 1 /* nresults */); > r = lua_tointeger(L, -1); > lua_pop(L, 1); > lua_close(L);
Thanks! I'll give this a try later. What's the -1 for in lua_tointeger()? Is there a good way to test this when I'm done? E.g. are there LUA tests in Vim's test suite that will exercise the garbage collector? Or maybe a toy script using the LUA interface I could run myself? -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.