Subject:
Re: [ruby-ffi] Re: Attaching function with two different signatures
From:
Wayne Meissner
Date:
6/5/10 6:15 AM
To:
ruby-ffi@googlegroups.com

Yep, thats probably the best way to do it.  Kinda tedious, I guess,
but its not a problem that comes up a lot, so its not a problem most
people hit (or they're just silent about it).

You should make an entry on the wiki with your problem and solution,
so others will know what to do.

and never be afraid to ask questions you think are "amateur" - its
likely someone else has hit or will hit the same problem at some point
in time, and having the question (and hopefully answer) in the mailing
list archive is always helpful.


On 5 June 2010 18:31, Arvicco <arvitallian@gmail.com> wrote:
> OK, I guess there is no way to tell attach_function that one of the
> arguments can be either :long or :pointer. I'm attaching this function
> twice with different names and signatures, and then using convenience
> method to check argument type and route call to attached function with
> appropriate signature...