35 # elif defined(TOLUA_EXPORTS)
36 # define TOLUA_API __declspec(dllexport)
38 # define TOLUA_API __declspec(dllimport)
41 # define TOLUA_API extern
49 #define TOLUA_VERSION "tolua++-1.0.92"
55 #define tolua_pushcppstring(x,y) tolua_pushstring(x,y.c_str())
56 #define tolua_iscppstring tolua_isstring
58 #define tolua_iscppstringarray tolua_isstringarray
59 #define tolua_pushfieldcppstring(L,lo,idx,s) tolua_pushfieldstring(L, lo, idx, s.c_str())
61 #define TEMPLATE_BIND(p)
62 #define TOLUA_TEMPLATE_BIND(p)
63 #define TOLUA_PROTECTED_DESTRUCTOR
64 #define TOLUA_PROPERTY_TYPE(p)
66 typedef int lua_Object;
79 #define TOLUA_NOPEER LUA_REGISTRYINDEX
81 TOLUA_API
const char* tolua_typename (lua_State* L,
int lo);
82 TOLUA_API
void tolua_error (lua_State* L,
const char* msg,
tolua_Error* err);
83 TOLUA_API
int tolua_isnoobj (lua_State* L,
int lo,
tolua_Error* err);
84 TOLUA_API
int tolua_isvalue (lua_State* L,
int lo,
int def,
tolua_Error* err);
85 TOLUA_API
int tolua_isboolean (lua_State* L,
int lo,
int def,
tolua_Error* err);
86 TOLUA_API
int tolua_isnumber (lua_State* L,
int lo,
int def,
tolua_Error* err);
87 TOLUA_API
int tolua_isstring (lua_State* L,
int lo,
int def,
tolua_Error* err);
88 TOLUA_API
int tolua_istable (lua_State* L,
int lo,
int def,
tolua_Error* err);
89 TOLUA_API
int tolua_isusertable (lua_State* L,
int lo,
const char* type,
int def,
tolua_Error* err);
90 TOLUA_API
int tolua_isuserdata (lua_State* L,
int lo,
int def,
tolua_Error* err);
91 TOLUA_API
int tolua_isusertype (lua_State* L,
int lo,
const char* type,
int def,
tolua_Error* err);
92 TOLUA_API
int tolua_isvaluearray
93 (lua_State* L,
int lo,
int dim,
int def,
tolua_Error* err);
94 TOLUA_API
int tolua_isbooleanarray
95 (lua_State* L,
int lo,
int dim,
int def,
tolua_Error* err);
96 TOLUA_API
int tolua_isnumberarray
97 (lua_State* L,
int lo,
int dim,
int def,
tolua_Error* err);
98 TOLUA_API
int tolua_isstringarray
99 (lua_State* L,
int lo,
int dim,
int def,
tolua_Error* err);
100 TOLUA_API
int tolua_istablearray
101 (lua_State* L,
int lo,
int dim,
int def,
tolua_Error* err);
102 TOLUA_API
int tolua_isuserdataarray
103 (lua_State* L,
int lo,
int dim,
int def,
tolua_Error* err);
104 TOLUA_API
int tolua_isusertypearray
105 (lua_State* L,
int lo,
const char* type,
int dim,
int def,
tolua_Error* err);
107 TOLUA_API
void tolua_open (lua_State* L);
109 TOLUA_API
void* tolua_copy (lua_State* L,
void* value,
unsigned int size);
110 TOLUA_API
int tolua_register_gc (lua_State* L,
int lo);
111 TOLUA_API
int tolua_default_collect (lua_State* tolua_S);
113 TOLUA_API
void tolua_usertype (lua_State* L,
const char* type);
114 TOLUA_API
void tolua_beginmodule (lua_State* L,
const char* name);
115 TOLUA_API
void tolua_endmodule (lua_State* L);
116 TOLUA_API
void tolua_module (lua_State* L,
const char* name,
int hasvar);
117 TOLUA_API
void tolua_class (lua_State* L,
char* name,
char* base);
118 TOLUA_API
void tolua_cclass (lua_State* L,
const char* lname,
const char* name,
const char* base, lua_CFunction col);
119 TOLUA_API
void tolua_function (lua_State* L,
const char* name, lua_CFunction func);
120 TOLUA_API
void tolua_constant (lua_State* L,
const char* name,
double value);
121 TOLUA_API
void tolua_variable (lua_State* L,
const char* name, lua_CFunction
get, lua_CFunction
set);
122 TOLUA_API
void tolua_array (lua_State* L,
const char* name, lua_CFunction
get, lua_CFunction
set);
127 TOLUA_API
void tolua_pushvalue (lua_State* L,
int lo);
128 TOLUA_API
void tolua_pushboolean (lua_State* L,
int value);
129 TOLUA_API
void tolua_pushnumber (lua_State* L,
double value);
130 TOLUA_API
void tolua_pushstring (lua_State* L,
const char* value);
131 TOLUA_API
void tolua_pushuserdata (lua_State* L,
void* value);
132 TOLUA_API
void tolua_pushusertype (lua_State* L,
void* value,
const char* type);
133 TOLUA_API
void tolua_pushusertype_and_takeownership(lua_State* L,
void* value,
const char* type);
134 TOLUA_API
void tolua_pushfieldvalue (lua_State* L,
int lo,
int index,
int v);
135 TOLUA_API
void tolua_pushfieldboolean (lua_State* L,
int lo,
int index,
int v);
136 TOLUA_API
void tolua_pushfieldnumber (lua_State* L,
int lo,
int index,
double v);
137 TOLUA_API
void tolua_pushfieldstring (lua_State* L,
int lo,
int index,
const char* v);
138 TOLUA_API
void tolua_pushfielduserdata (lua_State* L,
int lo,
int index,
void* v);
139 TOLUA_API
void tolua_pushfieldusertype (lua_State* L,
int lo,
int index,
void* v,
const char* type);
140 TOLUA_API
void tolua_pushfieldusertype_and_takeownership (lua_State* L,
int lo,
int index,
void* v,
const char* type);
142 TOLUA_API
double tolua_tonumber (lua_State* L,
int narg,
double def);
143 TOLUA_API
const char* tolua_tostring (lua_State* L,
int narg,
const char* def);
144 TOLUA_API
void* tolua_touserdata (lua_State* L,
int narg,
void* def);
145 TOLUA_API
void* tolua_tousertype (lua_State* L,
int narg,
void* def);
146 TOLUA_API
int tolua_tovalue (lua_State* L,
int narg,
int def);
147 TOLUA_API
int tolua_toboolean (lua_State* L,
int narg,
int def);
148 TOLUA_API
double tolua_tofieldnumber (lua_State* L,
int lo,
int index,
double def);
149 TOLUA_API
const char* tolua_tofieldstring (lua_State* L,
int lo,
int index,
const char* def);
150 TOLUA_API
void* tolua_tofielduserdata (lua_State* L,
int lo,
int index,
void* def);
151 TOLUA_API
void* tolua_tofieldusertype (lua_State* L,
int lo,
int index,
void* def);
152 TOLUA_API
int tolua_tofieldvalue (lua_State* L,
int lo,
int index,
int def);
153 TOLUA_API
int tolua_getfieldboolean (lua_State* L,
int lo,
int index,
int def);
155 TOLUA_API
void tolua_dobuffer(lua_State* L,
char* B,
unsigned int size,
const char* name);
157 TOLUA_API
int class_gc_event (lua_State* L);
160 static inline const char* tolua_tocppstring (lua_State* L,
int narg,
const char* def) {
162 const char* s = tolua_tostring(L, narg, def);
166 static inline const char* tolua_tofieldcppstring (lua_State* L,
int lo,
int index,
const char* def) {
168 const char* s = tolua_tofieldstring(L, lo, index, def);
173 #define tolua_tocppstring tolua_tostring
174 #define tolua_tofieldcppstring tolua_tofieldstring
177 TOLUA_API
int tolua_fast_isa(lua_State *L,
int mt_indexa,
int mt_indexb,
int super_index);