mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-31 01:11:15 +00:00
The great repository rearrangement of 2017.
Files moved but not modified. Changes to follow in a subsequent commit. You down with CPP? git-svn-id: https://svn.eduke32.com/eduke32@6055 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
05985da5a3
commit
1cc9d13ccf
916 changed files with 0 additions and 319 deletions
47
source/build/include/lunatic.h
Normal file
47
source/build/include/lunatic.h
Normal file
|
@ -0,0 +1,47 @@
|
|||
/* The Lunatic Interpreter, part of EDuke32. Common, engine-side stuff. */
|
||||
|
||||
#ifndef ENGINE_LUNATIC_H_
|
||||
#define ENGINE_LUNATIC_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef USE_LUAJIT_2_1
|
||||
# include <luajit-2.1/lua.h>
|
||||
#else
|
||||
# include <luajit-2.0/lua.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *name;
|
||||
lua_State *L;
|
||||
} L_State;
|
||||
|
||||
|
||||
// -- functions --
|
||||
|
||||
// helpers taking the lua_State directly:
|
||||
void L_PushDebugTraceback(lua_State *L);
|
||||
void L_CheckAndRegisterFunction(lua_State *L, void *regkeyaddr);
|
||||
int L_HandleError(lua_State *L, int errcode, void (*ErrorPrintFunc)(const char *));
|
||||
|
||||
// Callback on Lua error. <str> must be used immediately or strdup'd.
|
||||
extern void (*L_ErrorFunc)(const char *str);
|
||||
// Out-of-memory handler, supposed to terminate the host program.
|
||||
extern void (*L_OutOfMemFunc)(void);
|
||||
|
||||
int L_CreateState(L_State *estate, const char *name, void (*StateSetupFunc)(lua_State *));
|
||||
void L_DestroyState(L_State *estate);
|
||||
int L_RunOnce(L_State *estate, const char *fn);
|
||||
int L_RunString(L_State *estate, char const *buf, int size, const char *name);
|
||||
|
||||
static inline int L_IsInitialized(const L_State *estate) { return (estate->L != NULL); }
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue