From: nobu.nokada@... Date: 2002-04-17T21:28:21+09:00 Subject: Re: visual c, ruby, and fastcall hassle Hi, At Wed, 17 Apr 2002 19:58:27 +0900, Lorien Dunn wrote: > today I tried to embed ruby in a computer game I'm working on. It uses > Auran's Jet 3d engine (www.auranjet.com), which is closed source, and > requires projects using it to be compiled with fastcall enabled. Fastcall is > a calling convention that does not permit variable numbers of arguments for > the sake of speed. However, by prefixing every function prototype in "ruby.h" > and "intern.h" with __cdecl I succeeded in building the app. Since __cdecl is default, that Jet 3d engine's header should have __fastcall? > Then I tried writing a linked in extension in c, and got a type error from > the function ptr argument of "rb_define_method": it wanted a VALUE _cdcel (*) > (VALUE, VALUE), and was getting a VALUE __fastcall (*) (VALUE,VALUE), so I > declared my function as _cdecl and recieved the same error! You can write wrapper functions. -- Nobu Nakada