]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Added CBDATA_NAMESPACED_CLASS_INIT to define static members of classes that
authorAlex Rousskov <rousskov@measurement-factory.com>
Fri, 20 Feb 2009 18:48:56 +0000 (11:48 -0700)
committerAlex Rousskov <rousskov@measurement-factory.com>
Fri, 20 Feb 2009 18:48:56 +0000 (11:48 -0700)
live in a namespace.

The alternative was to change CBDATA_CLASS_* macros so that the static member
name does not depend on the type. That may have been better, but perhaps there
are some, unknown to me, low-level reasons why unique member names are
required for class cbdata code to work.

src/cbdata.h

index 80cfc53bb5d970b309f184ed2a5a15da75cecc00..1ae6492d5468dd03f71a3cab0c45af7883cbf203 100644 (file)
@@ -378,6 +378,7 @@ extern cbdata_type cbdataInternalAddType(cbdata_type type, const char *label, in
 
 /// \ingroup CBDATAAPI
 #define CBDATA_CLASS_INIT(type) cbdata_type type::CBDATA_##type = CBDATA_UNKNOWN
+#define CBDATA_NAMESPACED_CLASS_INIT(namespace, type) cbdata_type namespace::type::CBDATA_##type = CBDATA_UNKNOWN
 
 /**
  \ingroup CBDATAAPI