;;; An error occurred in function CSTRUCT-SLOT-INFO:

"smallhairytroll" <[email protected]> Sun, 07 Dec 2003 22:26:34 -0000
Newsgroups gmane.lisp.corman
Message-ID <[email protected]>
I have moved my SDL FFI bindings to a seperate package and are
receiving the following error when I try to set a variable in a
structure:

(setf (ct:cref sdl:SDL_Rect rectangle x) (random width))

;;; An error occurred in function CSTRUCT-SLOT-INFO:
;;; Error: Cannot access C type (STRUCT X SHORT Y SHORT W
UNSIGNED-SHORT H UNSIGNED-SHORT) with access X

The structure looks like this...

typedef struct {
	Sint16 x;
	Sint16 y;
	Uint16 w;
	Uint16 h;
} SDL_Rect;

I don't receive an error when I read from a structure, only write to
it. For example, this works just fine:

(eql sdl:SDL_MOUSEBUTTONDOWN (ct:cref sdl:SDL_Event sdl-event type)

where SDL_Event looks like this...

typedef struct {
	Uint8 type;
    Uint8 buffer[1023];
} SDL_Event;

....

The problem seems to be that while the struct is exported, the
variables are not. Can't work out why accessing the struct works, but
attempting to write to the struct doesn't.

Anyone have any ideas ?

-Luke


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/SyjtlB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[email protected]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/