Skip to content
Snippets Groups Projects
Commit cb3deaaa authored by Logan Aerl Arias's avatar Logan Aerl Arias
Browse files

Update lauxlib.h

lauxlib.h: mark luaL_error as a REPORT function
parent 626ac069
No related branches found
No related tags found
2 merge requests!2355fix newer versions of mixerx,!2261check if LUA field exists before accessing it
...@@ -31,6 +31,26 @@ LUALIB_API void (luaL_setn) (lua_State *L, int t, int n); ...@@ -31,6 +31,26 @@ LUALIB_API void (luaL_setn) (lua_State *L, int t, int n);
/* extra error code for `luaL_load' */ /* extra error code for `luaL_load' */
#define LUA_ERRFILE (LUA_ERRERR+1) #define LUA_ERRFILE (LUA_ERRERR+1)
/* Compiler-specific attributes and other macros */
#ifdef __GNUC__ // __attribute__ ((X))
#if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) && defined (__MINGW32__) // MinGW, >= GCC 4.1
#if 0 //defined (__USE_MINGW_ANSI_STDIO) && __USE_MINGW_ANSI_STDIO > 0
#define FUNCREPORT __attribute__ ((format(gnu_printf, 2, 3)))
#elif (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) // >= GCC 4.4
#define FUNCREPORT __attribute__ ((format(ms_printf, 2, 3)))
#else
#define FUNCREPORT __attribute__ ((format(printf, 2, 3)))
#endif
#else
#define FUNCREPORT __attribute__ ((format(printf, 2, 3)))
#endif
#endif
#ifndef FUNCREPORT
#define FUNCREPORT
#endif
typedef struct luaL_Reg { typedef struct luaL_Reg {
const char *name; const char *name;
...@@ -65,7 +85,7 @@ LUALIB_API int (luaL_newmetatable) (lua_State *L, const char *tname); ...@@ -65,7 +85,7 @@ LUALIB_API int (luaL_newmetatable) (lua_State *L, const char *tname);
LUALIB_API void *(luaL_checkudata) (lua_State *L, int ud, const char *tname); LUALIB_API void *(luaL_checkudata) (lua_State *L, int ud, const char *tname);
LUALIB_API void (luaL_where) (lua_State *L, int lvl); LUALIB_API void (luaL_where) (lua_State *L, int lvl);
LUALIB_API int (luaL_error) (lua_State *L, const char *fmt, ...); LUALIB_API FUNCREPORT int (luaL_error) (lua_State *L, const char *fmt, ...);
LUALIB_API int (luaL_checkoption) (lua_State *L, int narg, const char *def, LUALIB_API int (luaL_checkoption) (lua_State *L, int narg, const char *def,
const char *const lst[]); const char *const lst[]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment