This is the mail archive of the 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]

Re: global variables & data tags (a la X-Windows callbacks) (Robert Brown) writes:

> Hi again.  I was noticing that there are two functions in gh.h:
> void gh_set_ext_data(SCM, void*)
> void gh_get_ext_data(SCM)
> These look like the same concept as "properties", only specifically for
> pointers.  They are commented out.  Do you know if this means that they
> will be implemented in the future?  I think they would be a lot easier to
> use than "properties" due to having to make a new smob just for this one
> pointer.

I proposed these functions as extensions to the gh_ API way back when
it was first designed.  The proposal was not accepted, but Mark
Galassi thought them interesting enough to include in the header file.

The theory here was to hide from the user the fact that smobs actually
use the cdr of a cons cell to store the smob data.  This is an
implementation detail that doesn't make sense to expose, IMHO.  So I
don't think that these functions would have done what you wanted
anyway (they were just for smobs).

-russ, a guile dinosaur

"Programming today is a race between software engineers striving to build 
bigger and better idiot-proof programs, and the Universe trying to produce 
bigger and better idiots. So far, the Universe is winning."
             -- Rich Cook