The Battle for Wesnoth  1.17.17+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 52 of file wesnoth_lua_config.h.

◆ LUA_COMPAT_5_2

#define LUA_COMPAT_5_2

Definition at line 51 of file wesnoth_lua_config.h.

◆ LUA_COMPAT_FLOATSTRING

#define LUA_COMPAT_FLOATSTRING

Definition at line 53 of file wesnoth_lua_config.h.

◆ luai_jmpbuf

#define luai_jmpbuf   int /* dummy variable */

Definition at line 110 of file wesnoth_lua_config.h.

◆ LUAI_THROW

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

Definition at line 85 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;\
}
Base class for exceptions that want to be thrown 'through' lua.
mock_char c
#define e

Definition at line 87 of file wesnoth_lua_config.h.

◆ strcoll

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

Definition at line 70 of file wesnoth_lua_config.h.