From 122671afbf683dddc56fdb50e66120ba782310f1 Mon Sep 17 00:00:00 2001 From: caiyiheng Date: Thu, 23 Dec 2021 17:38:03 +0800 Subject: [PATCH] fix lua version --- .gitignore | 1 + lua-snappy.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9f49517..1f632f3 100644 --- a/.gitignore +++ b/.gitignore @@ -47,4 +47,5 @@ snappy/m4/lt~obsolete.m4 snappy/missing snappy/snappy-stubs-public.h snappy/stamp-h1 +snappy/test-driver diff --git a/lua-snappy.cc b/lua-snappy.cc index 92a40fe..5e20779 100644 --- a/lua-snappy.cc +++ b/lua-snappy.cc @@ -88,7 +88,7 @@ static const luaL_Reg snappy[] = int luaopen_snappy(lua_State *L) { -#if LUA_VERSION_NUM == 502 +#if LUA_VERSION_NUM >= 502 luaL_newlib(L, snappy); #else luaL_register(L, "snappy", snappy);