mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Added VC++ support thanks to U.Nakamura's patch. [ruby-dev:25644]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1f0125e4aa
commit
dca41072d3
4 changed files with 18 additions and 8 deletions
|
@ -225,6 +225,8 @@ rb_dlcfunc_inspect(VALUE self)
|
|||
#if defined(__GNUC__)
|
||||
# define DECL_FUNC(f,ret,args,calltype) ret (__attribute__((calltype)) *f)(args)
|
||||
/* # define DECL_FUNC(f,ret,args,calltype) ret (*f)(args) */
|
||||
#elif defined(_MSC_VER)
|
||||
# define DECL_FUNC(f,ret,args,calltype) ret (__##calltype *f)(args)
|
||||
#else
|
||||
# error "unsupported compiler."
|
||||
#endif
|
||||
|
@ -331,7 +333,7 @@ rb_dlcfunc_call(VALUE self, VALUE ary)
|
|||
#if HAVE_LONG_LONG /* used in ruby.h */
|
||||
case DLTYPE_LONG_LONG:
|
||||
#define CASE(n) case n: { \
|
||||
DECL_FUNC(f,long long,DLSTACK_PROTO,cdecl) = cfunc->ptr; \
|
||||
DECL_FUNC(f,LONG_LONG,DLSTACK_PROTO,cdecl) = cfunc->ptr; \
|
||||
LONG_LONG ret; \
|
||||
ret = f(DLSTACK_ARGS(stack)); \
|
||||
result = LL2NUM(ret); \
|
||||
|
@ -429,7 +431,7 @@ rb_dlcfunc_call(VALUE self, VALUE ary)
|
|||
#if HAVE_LONG_LONG /* used in ruby.h */
|
||||
case DLTYPE_LONG_LONG:
|
||||
#define CASE(n) case n: { \
|
||||
DECL_FUNC(f,long long,DLSTACK_PROTO,stdcall) = cfunc->ptr; \
|
||||
DECL_FUNC(f,LONG_LONG,DLSTACK_PROTO,stdcall) = cfunc->ptr; \
|
||||
LONG_LONG ret; \
|
||||
ret = f(DLSTACK_ARGS(stack)); \
|
||||
result = LL2NUM(ret); \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue