public inbox for guile-gtk@sourceware.org
 help / color / mirror / Atom feed
From: Ariel Rios <ariel@arcavia.com>
To: guile-gtk@sourceware.cygnus.com
Cc: mvo@zagadka.ping.de
Subject: Constant strings in guile-gtk...
Date: Sun, 21 Jan 2001 13:03:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.10.10101211504220.4734-100000@soleil.gnome.org> (raw)

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



             reply	other threads:[~2001-01-21 13:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-21 13:03 Ariel Rios [this message]
2001-01-28 10:35 ` Marius Vollmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.10.10101211504220.4734-100000@soleil.gnome.org \
    --to=ariel@arcavia.com \
    --cc=guile-gtk@sourceware.cygnus.com \
    --cc=mvo@zagadka.ping.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).