X-Git-Url: https://git.distorted.org.uk/~mdw/pyke/blobdiff_plain/8963e6870299fa42fe81f2b6acc3fcddf2058a9b..d920a806df51ec41ffef2f8fb66a54235c2506eb:/catacomb-python.h diff --git a/catacomb-python.h b/catacomb-python.h index 6c1ae21..bf3d426 100644 --- a/catacomb-python.h +++ b/catacomb-python.h @@ -120,6 +120,21 @@ #include #include +/*----- Other preliminaries -----------------------------------------------*/ + +#define GOBBLE_SEMI extern int notexist +#if defined(__GNUC__) && defined(__ELF__) +# define PRIVATE_SYMBOLS _Pragma("GCC visibility push(hidden)") GOBBLE_SEMI +# define PUBLIC_SYMBOLS _Pragma("GCC visibility pop") GOBBLE_SEMI +# define EXPORT __attribute__((__visibility__("default"))) +#else +# define PRIVATE_SYMBOLS GOBBLE_SEMI +# define PUBLIC_SYMBOLS GOBBLE_SEMI +# define EXPORT +#endif + +PRIVATE_SYMBOLS; + /*----- Utility macros ----------------------------------------------------*/ #define RETURN_OBJ(obj) do { Py_INCREF(obj); return (obj); } while (0)