diff --git a/src/bind_building.c b/src/bind_building.c index ecd47d20f..8b89d2618 100644 --- a/src/bind_building.c +++ b/src/bind_building.c @@ -13,6 +13,7 @@ without prior permission by the authors of Eressea. #include #include "bind_building.h" #include "bind_unit.h" +#include "bind_dict.h" #include #include @@ -42,7 +43,7 @@ int tolua_buildinglist_next(lua_State * L) static int tolua_building_get_objects(lua_State * L) { building *self = (building *)tolua_tousertype(L, 1, 0); - tolua_pushusertype(L, (void *)&self->attribs, TOLUA_CAST "hashtable"); + tolua_pushusertype(L, (void *)&self->attribs, USERTYPE_DICT); return 1; } diff --git a/src/bind_dict.c b/src/bind_dict.c index 52ebb86ba..28bcc5d81 100644 --- a/src/bind_dict.c +++ b/src/bind_dict.c @@ -167,14 +167,14 @@ static int tolua_dict_set(lua_State * L) void tolua_dict_open(lua_State * L) { /* register user types */ - tolua_usertype(L, TOLUA_CAST "dict"); + tolua_usertype(L, USERTYPE_DICT); tolua_module(L, NULL, 0); tolua_beginmodule(L, NULL); { - tolua_cclass(L, TOLUA_CAST "dict", TOLUA_CAST "dict", + tolua_cclass(L, USERTYPE_DICT, USERTYPE_DICT, TOLUA_CAST "", NULL); - tolua_beginmodule(L, TOLUA_CAST "dict"); + tolua_beginmodule(L, USERTYPE_DICT); { tolua_function(L, TOLUA_CAST "get", tolua_dict_get); tolua_function(L, TOLUA_CAST "set", tolua_dict_set); diff --git a/src/bind_dict.h b/src/bind_dict.h index a5476e413..83ca1efbf 100644 --- a/src/bind_dict.h +++ b/src/bind_dict.h @@ -14,6 +14,8 @@ without prior permission by the authors of Eressea. extern "C" { #endif +#define USERTYPE_DICT ((char *)"dict") + struct lua_State; void tolua_dict_open(struct lua_State *L); diff --git a/src/bind_faction.c b/src/bind_faction.c index 5f81aa040..df89f9d5a 100644 --- a/src/bind_faction.c +++ b/src/bind_faction.c @@ -13,6 +13,7 @@ without prior permission by the authors of Eressea. #include #include "bind_faction.h" #include "bind_unit.h" +#include "bind_dict.h" #include "bindings.h" #include "helpers.h" @@ -226,7 +227,7 @@ static int tolua_faction_addnotice(lua_State * L) static int tolua_faction_get_objects(lua_State * L) { faction *self = (faction *)tolua_tousertype(L, 1, 0); - tolua_pushusertype(L, (void *)&self->attribs, TOLUA_CAST "hashtable"); + tolua_pushusertype(L, (void *)&self->attribs, USERTYPE_DICT); return 1; } diff --git a/src/bind_region.c b/src/bind_region.c index cfc5d0f72..792f15ac0 100644 --- a/src/bind_region.c +++ b/src/bind_region.c @@ -14,6 +14,7 @@ without prior permission by the authors of Eressea. #include "bind_region.h" #include "bind_unit.h" #include "bind_ship.h" +#include "bind_dict.h" #include "bind_building.h" #include "chaos.h" @@ -428,7 +429,7 @@ static int tolua_region_set_resource(lua_State * L) static int tolua_region_get_objects(lua_State * L) { region *self = (region *)tolua_tousertype(L, 1, 0); - tolua_pushusertype(L, (void *)&self->attribs, TOLUA_CAST "hashtable"); + tolua_pushusertype(L, (void *)&self->attribs, USERTYPE_DICT); return 1; } diff --git a/src/bind_ship.c b/src/bind_ship.c index f87ef3575..7dd1b02f6 100644 --- a/src/bind_ship.c +++ b/src/bind_ship.c @@ -13,6 +13,7 @@ without prior permission by the authors of Eressea. #include #include "bind_ship.h" #include "bind_unit.h" +#include "bind_dict.h" #include "move.h" @@ -117,7 +118,7 @@ static int tolua_ship_get_units(lua_State * L) static int tolua_ship_get_objects(lua_State * L) { ship *self = (ship *)tolua_tousertype(L, 1, 0); - tolua_pushusertype(L, (void *)&self->attribs, TOLUA_CAST "hashtable"); + tolua_pushusertype(L, (void *)&self->attribs, USERTYPE_DICT); return 1; } diff --git a/src/bind_unit.c b/src/bind_unit.c index f921d1e8d..e18a81d8a 100755 --- a/src/bind_unit.c +++ b/src/bind_unit.c @@ -13,6 +13,7 @@ without prior permission by the authors of Eressea. #include #include "bind_unit.h" +#include "bind_dict.h" #ifdef BSON_ATTRIB # include "bind_attrib.h" #endif @@ -59,7 +60,7 @@ without prior permission by the authors of Eressea. static int tolua_unit_get_objects(lua_State * L) { unit *self = (unit *)tolua_tousertype(L, 1, 0); - tolua_pushusertype(L, (void *)&self->attribs, TOLUA_CAST "hashtable"); + tolua_pushusertype(L, (void *)&self->attribs, USERTYPE_DICT); return 1; } diff --git a/src/buildno.h b/src/buildno.h index d2eaeffee..008d66547 100644 --- a/src/buildno.h +++ b/src/buildno.h @@ -1,3 +1,3 @@ #define VERSION_MAJOR 3 -#define VERSION_MINOR 5 -#define VERSION_BUILD 697 +#define VERSION_MINOR 4 +#define VERSION_BUILD 698