added wxDEPRECATED_BUT_USED_INTERNALLY_INLINE

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59163 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-02-26 16:10:50 +00:00
parent cd60273b3d
commit 531cfed2d1
2 changed files with 23 additions and 1 deletions

View File

@@ -530,6 +530,17 @@ typedef short int WXTYPE;
# define wxDEPRECATED_BUT_USED_INTERNALLY(x) wxDEPRECATED(x) # define wxDEPRECATED_BUT_USED_INTERNALLY(x) wxDEPRECATED(x)
#endif #endif
/*
Combination of the two variants above: should be used for deprecated
functions which are defined inline and are used by wxWidgets itself.
*/
#ifdef WXBUILDING
# define wxDEPRECATED_BUT_USED_INTERNALLY_INLINE(func, body) func { body }
#else
# define wxDEPRECATED_BUT_USED_INTERNALLY_INLINE(func, body) \
wxDEPRECATED(func) { body }
#endif
/* everybody gets the assert and other debug macros */ /* everybody gets the assert and other debug macros */
#include "wx/debug.h" #include "wx/debug.h"

View File

@@ -1065,7 +1065,7 @@ template <typename T> wxDELETEA(T*& array);
public: public:
// OldMethod() is deprecated, use NewMethod() instead // OldMethod() is deprecated, use NewMethod() instead
void NewMethod(); void NewMethod();
wxDEPRECATED_INLINE( void OldMethod(), NewMethod() ); wxDEPRECATED_INLINE( void OldMethod(), NewMethod(); )
}; };
@endcode @endcode
@@ -1073,6 +1073,17 @@ template <typename T> wxDELETEA(T*& array);
*/ */
#define wxDEPRECATED_INLINE(func, body) #define wxDEPRECATED_INLINE(func, body)
/**
Combination of wxDEPRECATED_BUT_USED_INTERNALLY() and wxDEPRECATED_INLINE().
This macro should be used for deprecated functions called by the library
itself (usually for backwards compatibility reasons) and which are defined
inline.
@header{wx/defs.h}
*/
#define wxDEPRECATED_BUT_USED_INTERNALLY_INLINE(func, body)
/** /**
@c wxEXPLICIT is a macro which expands to the C++ @c explicit keyword if @c wxEXPLICIT is a macro which expands to the C++ @c explicit keyword if
the compiler supports it or nothing otherwise. Thus, it can be used even in the compiler supports it or nothing otherwise. Thus, it can be used even in