The Battle for Wesnoth  1.15.2+dev
Macros
wesnoth_lua_config.h File Reference
#include <string.h>
#include <cassert>
#include <exception>
#include "lua_jailbreak_exception.hpp"
Include dependency graph for wesnoth_lua_config.h:

Go to the source code of this file.

Macros

#define LUA_COMPAT_5_2
 
#define LUA_COMPAT_5_1
 
#define LUA_COMPAT_FLOATSTRING
 
#define strcoll(a, b)   strcmp(a,b)
 
#define LUAI_THROW(L, c)   throw(c)
 
#define LUAI_TRY(L, c, a)
 
#define luai_jmpbuf   int /* dummy variable */
 

Macro Definition Documentation

◆ LUA_COMPAT_5_1

#define LUA_COMPAT_5_1

Definition at line 51 of file wesnoth_lua_config.h.

◆ LUA_COMPAT_5_2

#define LUA_COMPAT_5_2

Definition at line 50 of file wesnoth_lua_config.h.

◆ LUA_COMPAT_FLOATSTRING

#define LUA_COMPAT_FLOATSTRING

Definition at line 52 of file wesnoth_lua_config.h.

◆ luai_jmpbuf

#define luai_jmpbuf   int /* dummy variable */

Definition at line 109 of file wesnoth_lua_config.h.

◆ LUAI_THROW

#define LUAI_THROW (   L,
  c 
)    throw(c)

Definition at line 84 of file wesnoth_lua_config.h.

◆ LUAI_TRY

#define LUAI_TRY (   L,
  c,
  a 
)
Value:
try { \
try { \
a \
} catch(const lua_jailbreak_exception &e) { \
e.store(); \
throw; \
} catch(const std::exception &e) { \
lua_pushstring(L, e.what()); \
luaG_errormsg(L); \
throw; \
} catch (const lua_longjmp *) { \
/*this exception is used internaly by lua exceptions*/ \
throw; \
} catch(...) { \
assert(false && "Lua is swallowing an un-named exception... this indicates a programmer error, please derive all exceptions from either std::exception, or lua_jailbreak_exception (and not with multiple inheritance pathways to either or this exception handler will not work!)"); \
throw; \
} \
} catch(...) { \
if((c)->status == 0) \
(c)->status = -1;\
}
#define e
mock_char c
Base class for exceptions that want to be thrown &#39;through&#39; lua.

Definition at line 86 of file wesnoth_lua_config.h.

◆ strcoll

#define strcoll (   a,
  b 
)    strcmp(a,b)

Definition at line 69 of file wesnoth_lua_config.h.

Referenced by l_strcmp().