Make SWIGIMPORT definition more consistent with SWIGEXPORT
Use the same checks as for the definition of SWIGEXPORT in swiglabels.swg. Also avoid defining __DLL_IMPORT symbol with a reserved name.
This commit is contained in:
parent
e41234c5bc
commit
d65d7d7df3
1 changed files with 8 additions and 8 deletions
|
|
@ -4,16 +4,16 @@
|
|||
|
||||
%insert("cheader") %{
|
||||
#ifndef SWIGIMPORT
|
||||
# ifndef __GNUC__
|
||||
# define __DLL_IMPORT __declspec(dllimport)
|
||||
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
||||
# if defined(STATIC_LINKED)
|
||||
# define SWIGDLLIMPORT
|
||||
# else
|
||||
# define SWIGDLLIMPORT __declspec(dllimport)
|
||||
# endif
|
||||
# else
|
||||
# define __DLL_IMPORT __attribute__((dllimport)) extern
|
||||
# endif
|
||||
# if !defined (__WIN32__)
|
||||
# define SWIGIMPORT extern
|
||||
# else
|
||||
# define SWIGIMPORT __DLL_IMPORT
|
||||
# define SWIGDLLIMPORT
|
||||
# endif
|
||||
# define SWIGIMPORT extern SWIGDLLIMPORT
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue