Marc Feeley feeley@iro.umontreal.ca writes:
Your message prompted me to do some extensions to the FFI's foreign type implementation I was meaning to do for a while.
Wow --- I think I'm hooked on Gambit ;)
On 10-Jan-08, at 10:56 AM, Joel J. Adamson wrote:
Dear Gambit List,
I have a set of datatypes defined with c-define-type based on the GNU Scientific Library. The Gambit-C manual says "For type checking on the Scheme side..." to use the TAG function of the type definition as in
(c-define-type gsl-matrix* (pointer gsl-matrix "gsl-matrix*"))
Note that your code is incorrect. It should read
(c-define-type gsl-matrix* (pointer gsl-matrix gsl-matrix*))
Yes, I was typing it from memory; it actually reads like this:
(c-define-type gsl-matrix (type "gsl_matrix" gsl-matrix)) (c-define-type gsl-matrix* (pointer "gsl_matrix" gsl-matrix*))
The only difference being the double-quotation marks around the C type; should I not use them?
What is the best way to use this to define a boolean test (e.g. gsl-matrix*?) for this type?
The new implementation of foreign types (now in the Gambit repository)
Looks like I'll be installing Mercurial ;)
Thanks a huge bunch for your suggestions (and needless to say for updating the code --- open source strikes again).
Joel