mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 15:58:36 +00:00
Export many things
This commit is contained in:
+9
-1
@@ -2,13 +2,21 @@
|
||||
#define EQEMU_LUA_PTR_H
|
||||
#ifdef LUA_EQEMU
|
||||
|
||||
//TODO: Remove the error checking by a flag since this adds significant overhead to each c call
|
||||
#ifndef EQEMU_UNSAFE_LUA
|
||||
#define Lua_Safe_Call_Void() if(!d_) { return; } NativeType *self = reinterpret_cast<NativeType*>(d_)
|
||||
#define Lua_Safe_Call_Bool() if(!d_) { return false; } NativeType *self = reinterpret_cast<NativeType*>(d_)
|
||||
#define Lua_Safe_Call_Int() if(!d_) { return 0; } NativeType *self = reinterpret_cast<NativeType*>(d_)
|
||||
#define Lua_Safe_Call_Real() if(!d_) { return 0.0; } NativeType *self = reinterpret_cast<NativeType*>(d_)
|
||||
#define Lua_Safe_Call_String() if(!d_) { return ""; } NativeType *self = reinterpret_cast<NativeType*>(d_)
|
||||
#define Lua_Safe_Call_Class(type) if(!d_) { return type(); } NativeType *self = reinterpret_cast<NativeType*>(d_)
|
||||
#else
|
||||
#define Lua_Safe_Call_Void() NativeType *self = reinterpret_cast<NativeType*>(d_)
|
||||
#define Lua_Safe_Call_Bool() NativeType *self = reinterpret_cast<NativeType*>(d_)
|
||||
#define Lua_Safe_Call_Int() NativeType *self = reinterpret_cast<NativeType*>(d_)
|
||||
#define Lua_Safe_Call_Real() NativeType *self = reinterpret_cast<NativeType*>(d_)
|
||||
#define Lua_Safe_Call_String() NativeType *self = reinterpret_cast<NativeType*>(d_)
|
||||
#define Lua_Safe_Call_Class(type) NativeType *self = reinterpret_cast<NativeType*>(d_)
|
||||
#endif
|
||||
|
||||
template<typename T>
|
||||
class Lua_Ptr
|
||||
|
||||
Reference in New Issue
Block a user