chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] Is there another way to return data from a C function?


From: Eduardo Cavazos
Subject: [Chicken-users] Is there another way to return data from a C function?
Date: Tue, 12 Jun 2007 04:30:49 -0500
User-agent: KMail/1.9.1

Hey!

I'm new to the Chicken FFI...

The xlib function XQueryPointer accepts a few pointers to indicate where to 
return the data. I read about locations in the manual and have successfully 
called used xquerypointer like this:

         (let-location ((root-return unsigned-long)
                        (child-return unsigned-long)
                        (root-x-return integer)
                        (root-y-return integer)
                        (win-x-return integer)
                        (win-y-return integer)
                        (mask-return unsigned-integer))
           (xquerypointer dpy-ptr id
                          (location root-return)
                          (location child-return)
                          (location root-x-return)
                          (location root-y-return)
                          (location win-x-return)
                          (location win-y-return)
                          (location mask-return))

That only works with the compiler (csc). Is there a way to box/unbox data in 
the interpreter so I can call xquerypointer from csi? Just curious as it's 
easier to experiment via csi instead of recompiling my file each time a 
change is made.

Thanks,

Ed




reply via email to

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