diff options
author | Hugo Lima <hugo.lima@openbossa.org> | 2009-11-11 17:22:56 -0200 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-11-12 09:38:36 -0300 |
commit | b58553f67867dc3e09243a137de560f83758f4a4 (patch) | |
tree | fbd8e7b9a1dfb0af95c55ec7af8af7da3982a7c0 /libshiboken/helper.h | |
parent | 627d4cc994ba1c122995b367e2fc63a02d02d04a (diff) |
Add visibility policies to libshiboken and for bindings generated by shiboken generator.
As shiboken generator needs minor changes to support inter-module dependencies, these changes
about symbol visibility does not support inter-module dependencies, however support it is
simple, because we just need to make some symbols visible to other DSO's.
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'libshiboken/helper.h')
-rw-r--r-- | libshiboken/helper.h | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/libshiboken/helper.h b/libshiboken/helper.h index fc2f1aab9..c6ab2c98e 100644 --- a/libshiboken/helper.h +++ b/libshiboken/helper.h @@ -36,35 +36,12 @@ #define HELPER_H #include <Python.h> +#include "shibokenmacros.h" namespace Shiboken { -// Generic helper definitions for shared library support -#if defined _WIN32 || defined __CYGWIN__ -#define SHIBOKEN_HELPER_DLL_IMPORT __declspec(dllimport) -#define SHIBOKEN_HELPER_DLL_EXPORT __declspec(dllexport) -#define SHIBOKEN_HELPER_DLL_LOCAL -#else -#if __GNUC__ >= 4 -#define SHIBOKEN_HELPER_DLL_IMPORT __attribute__ ((visibility("default"))) -#define SHIBOKEN_HELPER_DLL_EXPORT __attribute__ ((visibility("default"))) -#define SHIBOKEN_HELPER_DLL_LOCAL __attribute__ ((visibility("internal"))) -#else -#define SHIBOKEN_HELPER_DLL_IMPORT -#define SHIBOKEN_HELPER_DLL_EXPORT -#define SHIBOKEN_HELPER_DLL_LOCAL -#endif -#endif - -// Now we use the generic helper definitions above to define SHIBOKEN_API and SHIBOKEN_LOCAL. -// SHIBOKEN_API is used for the public API symbols. It either DLL imports or DLL exports (or does nothing for static build) -// SHIBOKEN_LOCAL is used for non-api symbols. - -#define SHIBOKEN_API SHIBOKEN_HELPER_DLL_EXPORT -#define SHIBOKEN_LOCAL SHIBOKEN_HELPER_DLL_LOCAL - -bool PySequence_to_argc_argv(PyObject* argList, int* argc, char*** argv); +LIBSHIBOKEN_API bool PySequence_to_argc_argv(PyObject* argList, int* argc, char*** argv); } // namespace Shiboken |