remove obsolete defines.

This commit is contained in:
Enno Rehling 2017-12-09 16:53:36 +01:00
parent 643883d539
commit 866abcc92c
2 changed files with 0 additions and 37 deletions

View File

@ -763,38 +763,6 @@ static int tolua_unit_get_spells(lua_State * L)
return tolua_selist_push(L, "spellbook", "spell_entry", slist);
}
#ifdef TOLUA_ORDERS_CLOSURE
/* TODO: this requires that the locale for write_order is included in the closure */
static int tolua_orderlist_next(lua_State * L)
{
order **order_ptr = (order **)lua_touserdata(L, lua_upvalueindex(1));
order *ord = *order_ptr;
if (ord != NULL) {
char cmd[8192];
write_order(ord, cmd, sizeof(cmd));
tolua_pushstring(L, cmd);
*order_ptr = ord->next;
return 1;
}
return 0;
}
static int tolua_unit_get_orders(lua_State * L)
{
unit *self = (unit *)tolua_tousertype(L, 1, 0);
order **order_ptr = (order **)lua_newuserdata(L, sizeof(order *));
luaL_getmetatable(L, TOLUA_CAST "order");
lua_setmetatable(L, -2);
*order_ptr = self->orders;
lua_pushcclosure(L, tolua_orderlist_next, 1);
return 1;
}
#endif
static int tolua_unit_get_curse(lua_State *L) {
unit *self = (unit *)tolua_tousertype(L, 1, 0);
const char *name = tolua_tostring(L, 2, 0);
@ -1006,9 +974,6 @@ void tolua_unit_open(lua_State * L)
tolua_function(L, TOLUA_CAST "add_order", tolua_unit_add_order);
tolua_function(L, TOLUA_CAST "clear_orders", tolua_unit_clear_orders);
#ifdef TOLUA_ORDERS_CLOSURE
tolua_variable(L, TOLUA_CAST "orders", tolua_unit_get_orders, 0);
#endif
tolua_function(L, TOLUA_CAST "get_curse", tolua_unit_get_curse);
tolua_function(L, TOLUA_CAST "has_attrib", tolua_unit_has_attrib);

View File

@ -56,9 +56,7 @@ extern "C" {
extern const struct attrib_type at_learning;
#ifndef NO_TESTS
void inject_learn(learn_fun fun);
#endif
#ifdef __cplusplus
}