chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] Chicken foreign type to SWIG type


From: Joel Reymont
Subject: [Chicken-users] Chicken foreign type to SWIG type
Date: Tue, 14 Dec 2004 21:41:15 +0000

Folks,

Is there a simple way of converting between Chicken's foreign type and a
SWIG type? I have a library (guichan) that I wrapped with SWIG. This
library uses SDL. I tried using the SDL egg with it but it does not work.

For example, I need to pass SDL_Surface* to the guichan wrapper takes
one. The SDL egg does this:

(define-record sdl-surface pointer)

(define-record-printer (sdl-surface s out) 
  (for-each (lambda (x) (display x out))
            (list "#<sdl-surface "(sdl-surface-pointer s)">")))

(define-foreign-type SDL_Surface (pointer "SDL_Surface")
  sdl-surface-pointer
  make-sdl-surface)

but SWIG would expect something like _p_SDL_Surface. 

Any suggestions apart from creating another SDL wrapper for Chicken?

    Thanks, Joel

-- 
OpenPoker: The Linux of poker software
http://wagerlabs.com/forums
Tenerife: Canary Islands: Spain






reply via email to

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