The Battle for Wesnoth  1.19.5+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 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

◆ luai_jmpbuf

#define luai_jmpbuf   int /* dummy variable */

Definition at line 81 of file wesnoth_lua_config.h.

◆ LUAI_THROW

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

Definition at line 57 of file wesnoth_lua_config.h.

◆ LUAI_TRY

#define LUAI_TRY (   L,
  c,
 
)
Value:
try { \
try { \
a \
} catch(const lua_jailbreak_exception &) { \
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 59 of file wesnoth_lua_config.h.

◆ strcoll

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

Definition at line 42 of file wesnoth_lua_config.h.