chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Conflict between easyffi and syntax-case


From: felix winkelmann
Subject: Re: [Chicken-users] Conflict between easyffi and syntax-case
Date: Wed, 14 Jan 2009 15:03:19 +0100

On Thu, Jan 8, 2009 at 1:14 AM, William Ramsay <address@hidden> wrote:

Hi, William.

Sorry for responding so late.

>
> I am trying to  use  macros  with a program  that  requires  some C
> functions.   But when I "require-extension syntax-case" and extend easyffi I
> get compile errors.    If I eliminate either one the code compiles fine.
> (I am also using the xlib egg in my program).

What exactly do you mean with "extend easyffi"? And what errors do
you get?

>
> While I'm at it I might as well add that I'm having some problems with xlib
> - probably because I don't know what I'm doing.
>
> For instance:      (let
>                             ((d-atom (xinternatom (display,
> "WM_DELETE_WINDOW", 0)
>
> creates a proper atom.     However it's a long.
>
> If I try to call   (xsetwmprotocols  display  window  d-atom 1) I get an
> error because  xsetwmprotocols wants a pointer, not a long.  How do I
> represent the address of d-atom in Scheme - is that even possible?     (If I
> can figure out how to do this I could probably eliminate the need for
> easyffi and solve my macro problem)
> Is programming fun or what!!!
>

I didn't come up with that API, it's taken from the stalin distribution.
Somehow you have to convert the atom-identifier into a pointer.
Try something like this:

(let-location ((atm unsigned-long d-atom))
  (xsetwmprotocols ... (location atm) ...))


cheers,
felix




reply via email to

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