I'm developing a port of Ruby for the Nokia internet tablets (N800 currently) with full bindings to the Maemo platform (hildon widgets, libosso, etc). I've hit a couple of snags along the way, which basically go like this:

I have a function I need to bind/wrap for ruby. It's prototype is:

osso_return_t osso_rpc_async_run( osso_context_t*, const gchar*, const gchar*, const gchar*, const gchar* osso_rpc_async_f*, gpointer, int, ... );

My question is this, how would I go about binding a function that has varargs? That is, how would I go about calling a C function that has varargs in it's prototype, like 'printf' et al, and the example enough. I'm baffled.

So I've come here hoping that someone might have a solution for me, hopefully someone has encountered and conquered this problem for. It seems like a pretty common thing. Obviously, my life and a lot of other peoples would be easier if people just stopped with this varargs stuff :)

Thanks for any help. - Tom.