summaryrefslogtreecommitdiff
path: root/ext/dl/cfunc.c
diff options
context:
space:
mode:
authorttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-07-06 19:59:31 +0000
committerttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-07-06 19:59:31 +0000
commitd01f22ec7cf339902e82b3c27f227db5117b20ed (patch)
treed27a534c8f3b28925c2d9f4c746b5ed2525a2da5 /ext/dl/cfunc.c
parent57fe65940c5db82ab6d932c3590578679a95ef6c (diff)
conformed to the usage of FUNC_CDECL/STDCALL described in [ruby-dev:28970].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/cfunc.c')
-rw-r--r--ext/dl/cfunc.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/ext/dl/cfunc.c b/ext/dl/cfunc.c
index 94816204f1b..458132b7843 100644
--- a/ext/dl/cfunc.c
+++ b/ext/dl/cfunc.c
@@ -222,20 +222,9 @@ rb_dlcfunc_inspect(VALUE self)
return val;
}
-#if defined(__GNUC__)
-# define DECL_FUNC_CDECL(f,ret,args) FUNC_CDECL(ret (*f)(args))
-# define DECL_FUNC_STDCALL(f,ret,args) FUNC_STDCALL(ret (*f)(args))
-/* # define DECL_FUNC(f,ret,args,calltype) ret (*f)(args) */
-#elif defined(_MSC_VER) || defined(__BORLANDC__)
-# define DECL_FUNC_CDECL(f,ret,args) ret (__cdecl *f)(args)
-# define DECL_FUNC_STDCALL(f,ret,args) ret (__stdcall *f)(args)
-#elif defined(__SUNPRO_C)
-# define DECL_FUNC(f,ret,args,calltype) ret (*f)(args)
-# define DECL_FUNC_CDECL(f,ret,args) ret (*f)(args)
-# define DECL_FUNC_STDCALL(f,ret,args) ret (*f)(args)
-#else
-# error "unsupported compiler."
-#endif
+
+# define DECL_FUNC_CDECL(f,ret,args) ret (FUNC_CDECL(*f))(args)
+# define DECL_FUNC_STDCALL(f,ret,args) ret (FUNC_STDCALL(*f))(args)
#define CALL_CASE switch( RARRAY(ary)->len ){ \
CASE(0); break; \