add support for the GCC visibility attribute

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8919 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-03-01 07:40:56 +00:00
commit ea220fbfd7
2 changed files with 34 additions and 6 deletions

View file

@ -1,5 +1,32 @@
Version 1.3.29 (In progress)
============================
03/01/2006: mmatus
Use the GCC visibility attribute in SWIGEXPORT.
Now you can compile (with gcc 4.0 or later) using
CFLAGS="-fvisibility=hidden".
Check the difference for the 'std_containers.i' python
test case:
Sizes:
3305432 _std_containers.so
2383992 _std_containers.so.hidden
Exported symbols (nm -D <file>.so | wc -l):
6146 _std_containers.so
174 _std_containers.so.hidden
Excecution times:
real 0m0.050s user 0m0.039s sys 0m0.005s _std_containers.so
real 0m0.039s user 0m0.026s sys 0m0.007s _std_containers.so.hidden
Read http://gcc.gnu.org/wiki/Visibility for more details.
02/27/2006: mutandiz
[allegrocl]
Add support for INPUT, OUTPUT, and INOUT typemaps.

View file

@ -50,11 +50,6 @@
# endif
#endif
#if (__GNUC__ >= 4)
# ifndef GCC_HASCLASSVISIBILITY
# define GCC_HASCLASSVISIBILITY
# endif
#endif
/* internal SWIG method */
#ifndef SWIGINTERN
@ -66,7 +61,13 @@
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
#endif
/* exporting methods for Windows DLLs */
/* exporting methods */
#if (__GNUC__ >= 4)
# ifndef GCC_HASCLASSVISIBILITY
# define GCC_HASCLASSVISIBILITY
# endif
#endif
#ifndef SWIGEXPORT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
# if defined(STATIC_LINKED)