diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-08-19 15:22:28 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-08-19 15:53:03 -0300 |
commit | 307e16cc9378a96cb937e44f42bb6a1548c77a99 (patch) | |
tree | f2aa18b0c0656d63194c743fc830aad33e94e1ce /libshiboken/shibokenmacros.h | |
parent | f056f08a8495f89037292b3c273aba254610ee8a (diff) |
Fix problems with dllimport/dllexport in some shiboken functions/variables.
Diffstat (limited to 'libshiboken/shibokenmacros.h')
-rw-r--r-- | libshiboken/shibokenmacros.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/libshiboken/shibokenmacros.h b/libshiboken/shibokenmacros.h index 5ef1718c5..bec0f56c8 100644 --- a/libshiboken/shibokenmacros.h +++ b/libshiboken/shibokenmacros.h @@ -1,7 +1,7 @@ /* * This file is part of the Shiboken Python Bindings Generator project. * -* Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). * * Contact: PySide team <contact@pyside.org> * @@ -35,21 +35,20 @@ #ifndef SHIBOKENMACROS_H #define SHIBOKENMACROS_H -// LIBSHIBOKEN_API is used for the public API symbols. -// LIBSHIBOKEN_LOCAL is used for non-api symbols, i.e. internal functions and classes. -// Generic helper definitions for shared library support +// LIBSHIBOKEN_API macro is used for the public API symbols. #if defined _WIN32 || defined __CYGWIN__ #if LIBSHIBOKEN_EXPORTS #define LIBSHIBOKEN_API __declspec(dllexport) #else - #define LIBSHIBOKEN_API + #ifdef _MSC_VER + #define LIBSHIBOKEN_API __declspec(dllimport) + #endif #endif -#else -#if __GNUC__ >= 4 +#elif __GNUC__ >= 4 #define LIBSHIBOKEN_API __attribute__ ((visibility("default"))) -#else - #define LIBSHIBOKEN_API -#endif #endif +#ifndef LIBSHIBOKEN_API + #define LIBSHIBOKEN_API +#endif #endif |