Skip to content

Commit

Permalink
Now Lua 5.2 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
stevedonovan committed Apr 25, 2012
1 parent 11dbfba commit 75c5eda
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion linenoise.c
Expand Up @@ -159,7 +159,10 @@ int luaopen_linenoise(lua_State *L)
lua_pushboolean(L, 0);
lua_setfield(L, -2, "__metatable");
lua_pop(L, 1);

#if LUA_VERSION_NUM > 501
luaL_setfuncs(L,linenoise_funcs,0);
#else
luaL_register(L, NULL, linenoise_funcs);
#endif
return 1;
}

0 comments on commit 75c5eda

Please sign in to comment.