Some fixes to linking problems.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-maciekd@10642 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Maciej Drwal 2008-07-03 14:55:03 +00:00
commit b2d56dee8e
3 changed files with 43 additions and 17 deletions

View file

@ -5,6 +5,8 @@
* c.swg
* ----------------------------------------------------------------------------- */
%insert("runtime") "clabels.swg"
%typemap(ctype) void, short, int, long, char, float, double "$1_type"
%typemap(ctype) void*, short*, int*, long*, char*, float*, double* "$1_type"
%typemap(ctype) bool "_Bool"

38
Lib/c/clabels.swg Normal file
View file

@ -0,0 +1,38 @@
/* -----------------------------------------------------------------------------
* See the LICENSE file for information on copyright, usage and redistribution
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
*
* clabels.swg
*
* Definitions of some C specific preprocessor symbols.
* ----------------------------------------------------------------------------- */
// this is used instead of default SWIGEXPORT symbol
#ifndef SWIGEXPORTC
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
# if defined(STATIC_LINKED)
# define SWIGEXPORTC
# else
# define SWIGEXPORTC
# endif
# else
# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
# define SWIGEXPORTC __attribute__ ((visibility("default")))
# else
# define SWIGEXPORTC
# endif
# endif
#endif
#ifndef SWIGPROTECT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
# define SWIGPROTECT(x)
# else
# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
# define SWIGPROTECT(x) __attribute__ ((visibility("protected"))) x
# else
# define SWIGPROTECT(x)
# endif
# endif
#endif