disable bson dependency, nobody is using that code

This commit is contained in:
Enno Rehling 2012-06-04 16:23:02 -07:00
parent c44ebad24e
commit 86928b5c31
3 changed files with 13 additions and 3 deletions

View File

@ -80,7 +80,7 @@ set (LIB_SRC
attributes/raceprefix.c
attributes/reduceproduction.c
attributes/targetregion.c
bindings/bind_attrib.c
# bindings/bind_attrib.c
bindings/bind_building.c
bindings/bind_faction.c
bindings/bind_gmtool.c

View File

@ -13,7 +13,9 @@ without prior permission by the authors of Eressea.
#include <platform.h>
#include "bind_unit.h"
#include "bind_attrib.h"
#ifdef BSON_ATTRIB
# include "bind_attrib.h"
#endif
#include "bindings.h"
/* attributes includes */
@ -60,6 +62,7 @@ static int tolua_unit_get_objects(lua_State * L)
return 1;
}
#ifdef BSON_ATTRIB
static int tolua_unit_get_attribs(lua_State * L)
{
unit *self = (unit *) tolua_tousertype(L, 1, 0);
@ -74,6 +77,7 @@ static int tolua_unit_get_attribs(lua_State * L)
lua_pushcclosure(L, tolua_attriblist_next, 1);
return 1;
}
#endif
int tolua_unitlist_nextf(lua_State * L)
{
@ -979,7 +983,9 @@ void tolua_unit_open(lua_State * L)
tolua_variable(L, TOLUA_CAST "hp_max", &tolua_unit_get_hpmax, 0);
tolua_variable(L, TOLUA_CAST "objects", &tolua_unit_get_objects, 0);
#ifdef BSON_ATTRIB
tolua_variable(L, TOLUA_CAST "attribs", &tolua_unit_get_attribs, 0);
#endif
}
tolua_endmodule(L);
}

View File

@ -13,7 +13,9 @@
#include <lauxlib.h>
#include <bindings/bindings.h>
#include <bindings/helpers.h>
#include <bindings/bind_attrib.h>
#ifdef BSON_ATTRIB
# include <bindings/bind_attrib.h>
#endif
#include <bindings/bind_building.h>
#include <bindings/bind_faction.h>
#include <bindings/bind_gmtool.h>
@ -99,7 +101,9 @@ static lua_State *lua_init(void)
tolua_ship_open(L);
tolua_region_open(L);
tolua_faction_open(L);
#ifdef BSON_ATTRIB
tolua_attrib_open(L);
#endif
tolua_unit_open(L);
tolua_message_open(L);
tolua_hashtable_open(L);