{"action":"created","issue":{"url":"https://api.github.com/repos/brimworks/lua-zip/issues/8","labels_url":"https://api.github.com/repos/brimworks/lua-zip/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/brimworks/lua-zip/issues/8/comments","events_url":"https://api.github.com/repos/brimworks/lua-zip/issues/8/events","html_url":"https://github.com/brimworks/lua-zip/issues/8","id":113554789,"number":8,"title":"Lua 5.3 support ?","user":{"login":"MisterDA","id":1773581,"avatar_url":"https://avatars.githubusercontent.com/u/1773581?v=3","gravatar_id":"","url":"https://api.github.com/users/MisterDA","html_url":"https://github.com/MisterDA","followers_url":"https://api.github.com/users/MisterDA/followers","following_url":"https://api.github.com/users/MisterDA/following{/other_user}","gists_url":"https://api.github.com/users/MisterDA/gists{/gist_id}","starred_url":"https://api.github.com/users/MisterDA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MisterDA/subscriptions","organizations_url":"https://api.github.com/users/MisterDA/orgs","repos_url":"https://api.github.com/users/MisterDA/repos","events_url":"https://api.github.com/users/MisterDA/events{/privacy}","received_events_url":"https://api.github.com/users/MisterDA/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-10-27T10:41:19Z","updated_at":"2015-12-19T15:51:54Z","closed_at":null,"body":"Hello again !\r\nLua 5.3 is the default with my Linux distribution, and there have been [changes](http://www.lua.org/manual/5.3/manual.html#8) and [depreciations](http://www.lua.org/manual/5.3/manual.html#8.3) between Lua 5.2 and Lua 5.3 .\r\nThe lib will compile but trigger an error because [`luaL_checkint`](http://www.lua.org/manual/5.2/manual.html#luaL_checkint) has been depreciated in favour of [`lua_checkinteger`](http://www.lua.org/manual/5.3/manual.html#luaL_checkinteger).\r\nPerhaps a little wrapper will do the trick :\r\n\r\n```patch\r\ndiff --git a/lua_zip.c b/lua_zip.c\r\nindex 5d1d22e..5e2ac07 100644\r\n--- a/lua_zip.c\r\n+++ b/lua_zip.c\r\n@@ -17,6 +17,10 @@\r\n #define luaL_register(L,_,funcs) luaL_setfuncs((L),funcs,0)\r\n #endif\r\n \r\n+#if LUA_VERSION_NUM > 502\r\n+#define luaL_checkint(L, arg) luaL_checkinteger((L), (arg))\r\n+#endif\r\n+\r\n #define ARCHIVE_MT      \"zip{archive}\"\r\n #define ARCHIVE_FILE_MT \"zip{archive.file}\"\r\n #define WEAK_MT         \"zip{weak}\"\r\n```\r\n\r\nBut now I'm getting an error when I run the tests, and I can't figure it out.\r\n\r\n```\r\n$ ./test.lua tests \r\nok 1 - Circular reference is error: Circular reference of zip sources is not allowed\r\nlua: ./test.lua:417: No such file\r\nstack traceback:\r\n\t[C]: in function 'assert'\r\n\t./test.lua:417: in function 'test_open_close'\r\n\t./test.lua:41: in function 'main'\r\n\t./test.lua:442: in main chunk\r\n\t[C]: in ?\r\n```"},"comment":{"url":"https://api.github.com/repos/brimworks/lua-zip/issues/comments/165997966","html_url":"https://github.com/brimworks/lua-zip/issues/8#issuecomment-165997966","issue_url":"https://api.github.com/repos/brimworks/lua-zip/issues/8","id":165997966,"user":{"login":"brimworks","id":64138,"avatar_url":"https://avatars.githubusercontent.com/u/64138?v=3","gravatar_id":"","url":"https://api.github.com/users/brimworks","html_url":"https://github.com/brimworks","followers_url":"https://api.github.com/users/brimworks/followers","following_url":"https://api.github.com/users/brimworks/following{/other_user}","gists_url":"https://api.github.com/users/brimworks/gists{/gist_id}","starred_url":"https://api.github.com/users/brimworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brimworks/subscriptions","organizations_url":"https://api.github.com/users/brimworks/orgs","repos_url":"https://api.github.com/users/brimworks/repos","events_url":"https://api.github.com/users/brimworks/events{/privacy}","received_events_url":"https://api.github.com/users/brimworks/received_events","type":"User","site_admin":false},"created_at":"2015-12-19T15:51:54Z","updated_at":"2015-12-19T15:51:54Z","body":"Unfortunately, Lua 5.2 doesn't appear to have that macro:\r\n\r\nhttp://www.lua.org/source/5.2/luaconf.h.html\r\n\r\n...but this looks like a great strategy for supporting Lua 5.3."}}