From: Paul Brannan Date: 2001-11-16T01:51:17+09:00 Subject: [ruby-talk:25279] Re: GC question This is a known problem with the 1.6.x series. It should be fixed in 1.7. Until then, do this: #define rb_gc_mark(value) \ ((void (*)(VALUE))(rb_gc_mark))(value) On Fri, 16 Nov 2001, Tony Smith wrote: > Hi there! > > I'm trying to sort out the garbage collection in a C++ extension, and I keep > getting these errors from gcc. Ruby is 1.6.4 on Linux. > > /usr/lib/ruby/1.6/i586-linux-gnu/intern.h:188: too many arguments to function > `void rb_gc_mark ()' > clientuserruby.cc:401: at this point in file > /usr/lib/ruby/1.6/i586-linux-gnu/intern.h:188: too many arguments to function > `void rb_gc_mark ()' > clientuserruby.cc:402: at this point in file > > I'm passing a VALUE argument to rb_gc_mark() for each Ruby object my C++ > object holds. Is that right? > > >From digging in the source, it seems that rb_gc_mark actually takes a "void > *" argument which doesn't agree with the prototype. > > Is this a bug? Or is there a trick to getting such code to compile. > > Thanks! > > Tony >