This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Using SCMs as hash keys


Hi,

I'm working on a project where I need to use SCMs as the keys of a
hash table implemented in C to refer to values which are C structs.
The keys need to be retrievable as a list from the Guile environment,
which will eventually runs in a separate thread from the C bit of the
program.

I know that a SCM is a long with type bits, and I'll be doing a
scm_protect_object on each key as it gets added. g_int_hash() and
g_int_equal() seem to do the right thing on my system. Are there any
issues involved with pulling out these SCMs and exporting them back to
the Guile environment in a list?

FYI, this is with glib version 1.2.6 and Guile 1.3.4.

Could you please send or Cc: any replies to my home address,
atc-at-piffle.force9.co.uk? Thanks.

-- 
Andrew Chadwick
System Documentation
Symbian Ltd.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]