diff options
Diffstat (limited to 'libshiboken')
-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 |