Author: sveinung
Date: Thu Aug 28 14:07:22 2014
New Revision: 26093

URL: http://svn.gna.org/viewcvs/freeciv?rev=26093&view=rev
Log:
Define bv_unit_type_flags in unit_type_flag_id using SPECENUM_BITVECTOR.

* Makes bv_unit_type_flags follow the size of the enum unit_type_flag_id.
* Makes bv_unit_type_flags' connection to unit_type_flag_id machine
  readable. (The extra type information is useful when auto generating
  support for the Freeciv protocol for languages that can express it)

See patch #5114

Modified:
    trunk/common/unittype.h
    trunk/fc_version

Modified: trunk/common/unittype.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/unittype.h?rev=26093&r1=26092&r2=26093&view=diff
==============================================================================
--- trunk/common/unittype.h     (original)
+++ trunk/common/unittype.h     Thu Aug 28 14:07:22 2014
@@ -258,11 +258,8 @@
 #define UTYF_LAST_USER_FLAG UTYF_USER_FLAG_16
 #define MAX_NUM_USER_UNIT_FLAGS (UTYF_LAST_USER_FLAG - UTYF_USER_FLAG_1 + 1)
 #define SPECENUM_NAMEOVERRIDE
+#define SPECENUM_BITVECTOR bv_unit_type_flags
 #include "specenum_gen.h"
-
-#define UTYF_MAX 64 /* Used in the network protocol. */
-
-FC_STATIC_ASSERT(UTYF_LAST_USER_FLAG < UTYF_MAX, too_many_unit_flags);
 
 
 /* Unit "roles": these are similar to unit flags but differ in that
@@ -357,7 +354,6 @@
 FC_STATIC_ASSERT(L_LAST - L_FIRST <= L_MAX, too_many_unit_roles);
 
 /* Used in the network protocol. */
-BV_DEFINE(bv_unit_type_flags, UTYF_MAX);
 BV_DEFINE(bv_unit_type_roles, L_MAX);
 
 /* Used in the network protocol. */

Modified: trunk/fc_version
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/fc_version?rev=26093&r1=26092&r2=26093&view=diff
==============================================================================
--- trunk/fc_version    (original)
+++ trunk/fc_version    Thu Aug 28 14:07:22 2014
@@ -54,7 +54,7 @@
 #   - Avoid adding a new mandatory capability to the development branch for
 #     as long as possible.  We want to maintain network compatibility with
 #     the stable branch for as long as possible.
-NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-2.6-2014.Aug.28"
+NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-2.6-2014.Aug.28b"
 NETWORK_CAPSTRING_OPTIONAL=""
 
 FREECIV_DISTRIBUTOR=""


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to