From 3a52d80879cb433a4f6997e1901aef4e42ef0202 Mon Sep 17 00:00:00 2001 From: tux <77389867@qq.com> Date: Sat, 17 Sep 2016 19:43:16 +0800 Subject: [PATCH] use standard type LUALIB_API for export interface --- lua_cjson.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lua_cjson.c b/lua_cjson.c index 22f33f12..ea34cce4 100644 --- a/lua_cjson.c +++ b/lua_cjson.c @@ -54,12 +54,6 @@ #define CJSON_VERSION "2.1devel" #endif -#ifdef _MSC_VER -#define CJSON_EXPORT __declspec(dllexport) -#else -#define CJSON_EXPORT extern -#endif - /* Workaround for Solaris platforms missing isinf() */ #if !defined(isinf) && (defined(USE_INTERNAL_ISINF) || defined(MISSING_ISINF)) #define isinf(x) (!isnan(x) && isnan((x) - (x))) @@ -1413,7 +1407,7 @@ static int lua_cjson_safe_new(lua_State *l) return 1; } -CJSON_EXPORT int luaopen_cjson(lua_State *l) +LUALIB_API int luaopen_cjson(lua_State *l) { lua_cjson_new(l); @@ -1427,7 +1421,7 @@ CJSON_EXPORT int luaopen_cjson(lua_State *l) return 1; } -CJSON_EXPORT int luaopen_cjson_safe(lua_State *l) +LUALIB_API int luaopen_cjson_safe(lua_State *l) { lua_cjson_safe_new(l);