chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] FFI unsigned long pointer


From: Toby Butzon
Subject: [Chicken-users] FFI unsigned long pointer
Date: Wed, 27 Jul 2005 09:23:24 -0400
User-agent: Mutt/1.5.8i

So, I'm playing with FFI (which is great, BTW :)). I'm writing some glue
to use MySQL's C API from within Scheme (which I hope to submit as an
egg soon...) and I've come across this:

unsigned long *mysql_fetch_lengths(MYSQL_RES *result)

Now, I can find out before I call this function how long the returned
array is going to be... I just don't know how to get that array back
into Scheme.  Could it be done using one of the srfi-4 foreign type
specifiers... Or, if not, perhaps I could write a C wrapper that calls
mysql_fetch_lengths, builds a vector out of the result with C_vector,
and returns that. (Then what? I tell foreign-lambda it's a scheme-object?)

Please forgive me if this has been answered already... There's similar
stuff already in the archives, but it doesn't quite seem to answer my
question (or maybe I'm just too dense... :-P).

Thanks!

-- 
Toby Butzon





reply via email to

[Prev in Thread] Current Thread [Next in Thread]