don't define EMPTY_PARAMETER_VALUE macro without wx prefix, this is an invitation for name clash; instead define wxEMPTY_PARAMETER_VALUE and use it in both variant.h and event.h

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-11-03 21:06:57 +00:00
parent ee0dd1b5e9
commit bde626ce30
3 changed files with 11 additions and 11 deletions

View File

@@ -47,5 +47,11 @@
/* Create a "unique" name with the given prefix */
#define wxMAKE_UNIQUE_NAME(text) wxCONCAT_LINE(text)
/*
This macro can be passed as argument to another macro when you don't have
anything to pass in fact.
*/
#define wxEMPTY_PARAMETER_VALUE /* Fake macro parameter value */
#endif // _WX_CPP_H_

View File

@@ -13,6 +13,7 @@
#define _WX_EVENT_H__
#include "wx/defs.h"
#include "wx/cpp.h"
#include "wx/object.h"
#include "wx/clntdata.h"
@@ -94,8 +95,6 @@ typedef int wxEventType;
#define DECLARE_EVENT_TABLE_ENTRY(type, winid, idLast, fn, obj) \
wxEventTableEntry(type, winid, idLast, fn, obj)
#define EMPTY_PARAMETER_VALUE /* Fake macro parameter value */
#define BEGIN_DECLARE_EVENT_TYPES()
#define END_DECLARE_EVENT_TYPES()
#define DECLARE_EXPORTED_EVENT_TYPE(expdecl, name, value) \
@@ -103,7 +102,7 @@ typedef int wxEventType;
#define DECLARE_EVENT_TYPE(name, value) \
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, name, value)
#define DECLARE_LOCAL_EVENT_TYPE(name, value) \
DECLARE_EXPORTED_EVENT_TYPE(EMPTY_PARAMETER_VALUE, name, value)
DECLARE_EXPORTED_EVENT_TYPE(wxEMPTY_PARAMETER_VALUE, name, value)
#define DEFINE_EVENT_TYPE(name) const wxEventType name = wxNewEventType();
#define DEFINE_LOCAL_EVENT_TYPE(name) DEFINE_EVENT_TYPE(name)

View File

@@ -20,6 +20,7 @@
#include "wx/string.h"
#include "wx/arrstr.h"
#include "wx/list.h"
#include "wx/cpp.h"
#if wxUSE_DATETIME
#include "wx/datetime.h"
@@ -316,21 +317,15 @@ private:
DECLARE_DYNAMIC_CLASS(wxVariant)
};
/* Fake macro parameter value */
#ifdef EMPTY_PARAMETER_VALUE
#undef EMPTY_PARAMETER_VALUE
#endif
#define EMPTY_PARAMETER_VALUE
#define DECLARE_VARIANT_OBJECT(classname) \
DECLARE_VARIANT_OBJECT_EXPORTED(classname,EMPTY_PARAMETER_VALUE)
DECLARE_VARIANT_OBJECT_EXPORTED(classname, wxEMPTY_PARAMETER_VALUE)
#define DECLARE_VARIANT_OBJECT_EXPORTED(classname,expdecl) \
expdecl classname& operator << ( classname &object, const wxVariant &variant ); \
expdecl wxVariant& operator << ( wxVariant &variant, const classname &object );
#define IMPLEMENT_VARIANT_OBJECT(classname) \
IMPLEMENT_VARIANT_OBJECT_EXPORTED(classname,EMPTY_PARAMETER_VALUE)
IMPLEMENT_VARIANT_OBJECT_EXPORTED(classname, wxEMPTY_PARAMETER_VALUE)
#define IMPLEMENT_VARIANT_OBJECT_EXPORTED_NO_EQ(classname,expdecl) \
class classname##VariantData: public wxVariantData \