This is the mail archive of the
guile-gtk@sources.redhat.com
mailing list for the Guile project.
Re: Constant strings in guile-gtk...
- To: Ariel Rios <ariel at arcavia dot com>
- Subject: Re: Constant strings in guile-gtk...
- From: Marius Vollmer <mvo at zagadka dot ping dot de>
- Date: 28 Jan 2001 19:31:51 +0100
- Cc: guile-gtk at sourceware dot cygnus dot com
- References: <Pine.LNX.4.10.10101211504220.4734-100000@soleil.gnome.org>
Ariel Rios <ariel@arcavia.com> 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"))