[Top][All Lists]

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

Re: [Chicken-users] egg question

From: felix winkelmann
Subject: Re: [Chicken-users] egg question
Date: Fri, 28 Mar 2008 14:46:28 +0100

On Thu, Mar 27, 2008 at 1:02 PM, William Ramsay <address@hidden> wrote:
> Hi,
>  I'm working with the xlib egg, which naturally calls the xlib c
>  procedures.    In a case where the egg function has a parameter of
>  (POINTER UNSIGNED-CHAR) what do I use?  In other words how do I create a
>  pointer to a string in Scheme?

Unfortunately, you will have to create the appropriate foreign pointer
objects to some statically allocated data in this case (There is a comment
in the original xlib wrapper code that mentions this problem).
It should be possible to write some helper functions, but it will in any
case be a bit ugly. Another possibility is to write a small C wrapper
that calls the C Xlib function and provides a more easy to access
API. Some Xlib functions like XGetWindowProperty have a very complex
interface and interpret result locations different according to passed
flags. Horrible to wrap.


reply via email to

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