This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Accessing smob data
- To: guile at sourceware dot cygnus dot com
- Subject: Accessing smob data
- From: Neil Jerram <neil at ossau dot uklinux dot net>
- Date: Sun, 9 Apr 2000 21:48:46 +0100
In many cases, a smob's "data" is a pointer to an
application-allocated struct. Previously (i.e. about 2 weeks ago
CVS), such data could be accessed without a cast, viz.
mystruct_t * dat = SCM_SMOB_DATA (s);
In current CVS, this generates a compile warning (integer to pointer
conversion). To avoid the warning, a cast is required, viz.
mystruct_t * dat = (mystruct *) SCM_SMOB_DATA (s);
Two questions:
(1) Was this change an intentional side-effect of recent changes?
(2) Is SCM_SMOB_DATA the recommended way to extract a struct pointer
from a smob SCM value?
Thanks!
Neil