More types added eg UINT8, WORD, BYTE etc.

Add support for __declspec Microsoft extension, eg __declspec(dllimport).
Also other Windows calling conventions such as __stdcall.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7850 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2005-11-14 22:33:50 +00:00
commit 5ddd911531
2 changed files with 133 additions and 0 deletions

View file

@ -74,3 +74,22 @@ uint64 uint64_td(int64 i) { return i; }
%}
// Windows calling conventions and some types in windows.h
%inline %{
#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#else
#define __stdcall
#define __declspec(WINDOWS_EXTENDED_ATTRIBUTE)
#define DWORD unsigned int
#define PSZ char *
#endif
// Windows calling conventions
__declspec(dllexport) int __stdcall declspecstdcall(int i) { return i; }
DWORD mefod(DWORD d) { return d; }
PSZ funktion(PSZ d) { return d; }
%}