This is the mail archive of the
guile-gtk@sources.redhat.com
mailing list for the Guile project.
Constant strings in guile-gtk...
- To: guile-gtk at sourceware dot cygnus dot com
- Subject: Constant strings in guile-gtk...
- From: Ariel Rios <ariel at arcavia dot com>
- Date: Sun, 21 Jan 2001 15:09:43 -0500 (EST)
- cc: mvo at zagadka dot ping dot de
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 hacked:
(register-type
'cstring
(make-type "cstring" "const char*"
(lambda (x)
(@@ "(SCM_NIMP(~a) && SCM_RWSTRINGP(~a))" x x))
(lambda (x copy)
(@@ "(~a == NULL? SCM_BOOL_F : scm_take0str ((char *)~a))"
x x))
'fit-for-list #t
'conversion "sgtk_string_conversion"))
But that seems not a good thing... I use 'sgtk_string_conversion'
for I did not found what "conversion" is suppose to do.
Also, I am only getting parse error when declaring something as
'cstring' like:
(define-func e_cell_text_new
ECell
((cstring fontname)
(GtkJustification justify)))
ariel