diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-08-10 17:12:40 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:17:11 -0300 |
commit | 593b6345a8906b043d854a57bcb84a55f3955340 (patch) | |
tree | 88f4b0aec8553457c8d7dfc3a71c85fdf94f5d39 | |
parent | ac626ce3684ec42c56ab44dccc92fd2022ba5d7b (diff) |
Mark deprecated functions as deprecated.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Marcelo Lira <marcelo.lira@openbossa.org>
-rw-r--r-- | libshiboken/basewrapper.h | 8 | ||||
-rw-r--r-- | libshiboken/sbkenum.h | 3 | ||||
-rw-r--r-- | libshiboken/shibokenmacros.h | 4 |
3 files changed, 11 insertions, 4 deletions
diff --git a/libshiboken/basewrapper.h b/libshiboken/basewrapper.h index fdaca4ba6..3c6fa4f9e 100644 --- a/libshiboken/basewrapper.h +++ b/libshiboken/basewrapper.h @@ -109,7 +109,7 @@ void callCppDestructor(void* cptr) /** * Shiboken::importModule is DEPRECATED. Use Shiboken::Module::import() instead. */ -LIBSHIBOKEN_API bool importModule(const char* moduleName, PyTypeObject*** cppApiPtr); +SBK_DEPRECATED(LIBSHIBOKEN_API bool importModule(const char* moduleName, PyTypeObject*** cppApiPtr)); LIBSHIBOKEN_API void setErrorAboutWrongArguments(PyObject* args, const char* funcName, const char** cppOverloads); namespace ObjectType { @@ -343,10 +343,12 @@ LIBSHIBOKEN_API void invalidate(PyObject* pyobj); */ LIBSHIBOKEN_API void makeValid(SbkObject* self); +/// \deprecated Use destroy(SbkObject*, void*) +SBK_DEPRECATED(LIBSHIBOKEN_API void destroy(SbkObject* self)); + /** * Destroy any data in Shiboken structure and c++ pointer if the pyboject has the ownership - **/ -LIBSHIBOKEN_API void destroy(SbkObject* self); //DEPRECATED + */ LIBSHIBOKEN_API void destroy(SbkObject* self, void* cppData); /** diff --git a/libshiboken/sbkenum.h b/libshiboken/sbkenum.h index 52a0b6ffc..f205302ef 100644 --- a/libshiboken/sbkenum.h +++ b/libshiboken/sbkenum.h @@ -80,7 +80,8 @@ namespace Enum LIBSHIBOKEN_API PyObject* newItem(PyTypeObject* enumType, long itemValue, const char* itemName = 0); - LIBSHIBOKEN_API PyTypeObject* newType(const char* name); //Deprecated use 'newTypeWithName' + /// \deprecated Use 'newTypeWithName' + SBK_DEPRECATED(LIBSHIBOKEN_API PyTypeObject* newType(const char* name)); LIBSHIBOKEN_API PyTypeObject* newTypeWithName(const char* name, const char* cppName); LIBSHIBOKEN_API const char* getCppName(PyTypeObject* type); diff --git a/libshiboken/shibokenmacros.h b/libshiboken/shibokenmacros.h index 529daac24..08489421f 100644 --- a/libshiboken/shibokenmacros.h +++ b/libshiboken/shibokenmacros.h @@ -32,11 +32,15 @@ #define LIBSHIBOKEN_API __declspec(dllimport) #endif #endif + #define SBK_DEPRECATED(func) __declspec(deprecated) func #elif __GNUC__ >= 4 #define LIBSHIBOKEN_API __attribute__ ((visibility("default"))) + #define SBK_DEPRECATED(func) func __attribute__ ((deprecated)) #endif #ifndef LIBSHIBOKEN_API #define LIBSHIBOKEN_API + #define SBK_DEPRECATED(func) func #endif + #endif |