[Ecls-list] UFFI

Eric Merritt cyberlync at yahoo.com
Mon Jun 7 11:45:02 UTC 2004


Hello all,

 I thought I would report a little bug in uffi.
Considering the how Mr. Ripoll described createing the
uffi stuff thats not really surprising ;) In any case,
following is a piece of code pulled from cl-sdl and
modified slightly for ecl. It consitantly fails on
compile when it shouldn't. I thought you guys may be
interesting in it. (btw, I am using the latest cvs of
ecl) 

 On a side note, is there any information besides the
dev  guide on using ecl's native C interface? Thats
the reason I tried the uffi stuff in the first place
(good docs). In any case, here it is 

;-----------------------------------------------------
;;;; Foreign Types
(ffi:def-foreign-type c-string :cstring)
(ffi:def-foreign-type int :int)
(ffi:def-foreign-type unsigned-int :unsigned-int)

(ffi:def-foreign-type sint16 :short)
(ffi:def-foreign-type sint32 :int)

(ffi:def-foreign-type uint8  :unsigned-char)
(ffi:def-foreign-type uint16 :unsigned-short)
(ffi:def-foreign-type uint32 :unsigned-int)


;;;; Foreign Routines
(ffi:def-function ("SDL_GetError" get-error)
  nil
  :returning c-string)

(ffi:def-function ("SDL_Init" init)
  ((flags uint32))
  :returning int)

(ffi:def-function ("SDL_Quit" quit)
  nil
  :returning :void)



	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 




More information about the ecl-devel mailing list