From e4f1ea43f9a9275f33c97ea2862d9ca6b1546ff1 Mon Sep 17 00:00:00 2001 From: 'noloader' Date: Sun, 22 Sep 2013 02:19:37 +1200 Subject: [PATCH] Bug 3923: cbdata and undefined behavior due to dynamic runtime enumeration --- src/cbdata.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/cbdata.h b/src/cbdata.h index 51de95e2d0..f480596ee1 100644 --- a/src/cbdata.h +++ b/src/cbdata.h @@ -224,14 +224,12 @@ /** *\ingroup CBDATAAPI - * cbdata types. similar to the MEM_* types above, but managed - * in cbdata.c. A big difference is that these types are dynamically - * allocated. This list is only a list of predefined types. Other types - * are added runtime + * cbdata types. Similar to the MEM_* types, but managed in cbdata.cc + * A big difference is that cbdata types are dynamically allocated. + * Initially only UNKNOWN type is predefined. Other types are added runtime. */ -typedef enum { - CBDATA_UNKNOWN = 0 -} cbdata_type; +typedef int cbdata_type; +static const cbdata_type CBDATA_UNKNOWN = 0; /// \ingroup CBDATAAPI void cbdataRegisterWithCacheManager(void); -- 2.47.2