On Wed, Jul 25, 2012 at 7:30 PM, Nala Ginrut <nalaginrut@gmai...> wrote:
> hi Aleix!
> For our FFI system:
> char** <==> '* <==> (quote *)
> I'm not sure I understand your question correctly.
> I assume that you want to know what's the presentation of char** for
Let me try again: how do I create a C array of strings in scheme?
I took define-foreign from guile-gdbm (thanks Ian!):
(define libglut (dynamic-link "libglut"))
(define-syntax-rule (define-foreign name ret string-name args)
(pointer->procedure ret (dynamic-func string-name libglut) args)))
Then, for glutInit I already use '* as you suggest:
Which is obviously not working right now. I need to know how to create
char** to be given to %glutInit. I think I know it for the first
argument, which is a int* (I'll use a struct with an int and then
make-c-struct and then get the pointer).
But, how to create char**?
I'll probably go into this again in a couple of days, I feel like a
truck has ran over me today.