diff options
author | Araq <rumpf_a@web.de> | 2015-08-25 22:44:30 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-08-25 22:44:53 +0200 |
commit | c0ad9a96cef4793b3c2f2ce24f02da076ea887dc (patch) | |
tree | 0c4b0c5387e0c32163a51f405e7b081e712af69d /lib/nimbase.h | |
parent | f091ce258e36e1346f9dfc2b31bbba334f64aec2 (diff) | |
download | Nim-c0ad9a96cef4793b3c2f2ce24f02da076ea887dc.tar.gz |
fixes #3237
Diffstat (limited to 'lib/nimbase.h')
-rw-r--r-- | lib/nimbase.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/nimbase.h b/lib/nimbase.h index 2828eaff2..0946b9a1f 100644 --- a/lib/nimbase.h +++ b/lib/nimbase.h @@ -160,9 +160,15 @@ __clang__ #if defined(__BORLANDC__) || defined(__WATCOMC__) || \ defined(__POCC__) || defined(_MSC_VER) || defined(WIN32) || defined(_WIN32) /* these compilers have a fastcall so use it: */ -# define N_NIMCALL(rettype, name) rettype __fastcall name -# define N_NIMCALL_PTR(rettype, name) rettype (__fastcall *name) -# define N_RAW_NIMCALL __fastcall +# ifdef __TINYC__ +# define N_NIMCALL(rettype, name) rettype __attribute((__fastcall)) name +# define N_NIMCALL_PTR(rettype, name) rettype (__attribute((__fastcall)) *name) +# define N_RAW_NIMCALL __attribute((__fastcall)) +# else +# define N_NIMCALL(rettype, name) rettype __fastcall name +# define N_NIMCALL_PTR(rettype, name) rettype (__fastcall *name) +# define N_RAW_NIMCALL __fastcall +# endif #else # define N_NIMCALL(rettype, name) rettype name /* no modifier */ # define N_NIMCALL_PTR(rettype, name) rettype (*name) |