From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Vollmer To: Ariel Rios Cc: guile-gtk@sourceware.cygnus.com Subject: Re: Constant strings in guile-gtk... Date: Sun, 28 Jan 2001 10:35:00 -0000 Message-id: <87puh71qaw.fsf@zagadka.ping.de> References: X-SW-Source: 2001-q1/msg00005.html Ariel Rios writes: > Hi, > I have been wondering that guile-gtk might need > to handle const char* since a lot of of > GNOME code is now declaring things like that... I think you want to use (register-type 'cstring (make-type "cstring" "const char*" (lambda (x) (@@ "(SCM_NIMP(~a) && SCM_ROSTRINGP(~a))" x x)) (lambda (x) (@@ "((~a) == SCM_BOOL_F? NULL : SCM_CHARS(~a))" x x)) (lambda (x copy) (@@ "(~a == NULL? SCM_BOOL_F : scm_take0str (~a))" x x)) 'fit-for-list #t 'conversion "sgtk_string_conversion"))