[gambit-list] What is the Scheme notation for **argv
ceving at gmail.com
Wed Nov 2 10:18:42 EDT 2011
2011/11/2 Vok Vojwo <ceving at gmail.com>:
> I would like to write a c-lambda for gtk_init:
> As far as I see I have to specify a Scheme notation identifier for
> each C type. Which would be the correct one for the ***argv argument?
> This is a pointer to mains **argv.
I found the pointer specification. ;-)
(let ((gtk-init (c-lambda ((pointer int #f)
(pointer (pointer (pointer char #f) #f) #f))
(lambda () (gtk-init 0 0))))
But it still does not work.
In C it is possible to avoid the argc and argv arguments:
gtk_init (0, 0);
But the the above Gambit code throws an error:
*** ERROR IN | gtk-hello| -- (Argument 1) Can't convert to C pointer
(| gtk-hello#2| 0 0)
I am wondering why, because the #f tag should suppress type checking.
More information about the Gambit-list