|
|
@@ -51,9 +51,16 @@ PUBLISHED:
|
|
|
// phased out in favor of a simpler interface that does not require
|
|
|
// static init.
|
|
|
|
|
|
+// NOTE:
|
|
|
+// Having a macro called Configure proved to be problematic with some
|
|
|
+// DX9 headers. To avoid that in the future we provide a new family
|
|
|
+// of macros prefixed by DTool and deprecate the old ones, to be
|
|
|
+// removed from the codebase sometime in the future.
|
|
|
+
|
|
|
// This macro should appear in the config_*.h file.
|
|
|
|
|
|
#define ConfigureDecl(name, expcl, exptp)
|
|
|
+#define DToolConfigureDecl(name, expcl, exptp)
|
|
|
|
|
|
// This macro defines the actual declaration of the object defined
|
|
|
// above; it should appear in the config_*.cxx file.
|
|
|
@@ -64,11 +71,18 @@ PUBLISHED:
|
|
|
StaticInitializer_ ## name(); \
|
|
|
}; \
|
|
|
static StaticInitializer_ ## name name;
|
|
|
+#define DToolConfigureDef(name) \
|
|
|
+ class StaticInitializer_ ## name { \
|
|
|
+ public: \
|
|
|
+ StaticInitializer_ ## name(); \
|
|
|
+ }; \
|
|
|
+ static StaticInitializer_ ## name name;
|
|
|
|
|
|
// This macro can be used in lieu of the above two when the Configure
|
|
|
// object does not need to be visible outside of the current C file.
|
|
|
|
|
|
#define Configure(name) ConfigureDef(name)
|
|
|
+#define DToolConfigure(name) DToolConfigureDef(name)
|
|
|
|
|
|
// This one defines a block of code that will be executed at static
|
|
|
// init time. It must always be defined (in the C file), even if no
|
|
|
@@ -76,5 +90,7 @@ PUBLISHED:
|
|
|
|
|
|
#define ConfigureFn(name) \
|
|
|
StaticInitializer_ ## name::StaticInitializer_ ## name()
|
|
|
+#define DToolConfigureFn(name) \
|
|
|
+ StaticInitializer_ ## name::StaticInitializer_ ## name()
|
|
|
|
|
|
#endif /* __CONFIG_H__ */
|