2009/12/16 Ludovic Courtès <l...@gnu.org>: > Hi Linas, > > Linas Vepstas <linasveps...@gmail.com> writes: > >> I have a new feature request -- it would be useful, in a variety of >> situations, >> to be able to provide an opaque (void *) pointer when calling make_gsubr, >> and then getting that pointer back again whenever the primitive is called. > > One solution is to use applicable smobs (‘scm_set_smob_apply ()’, 1.8+) > or applicable structs (1.9). How well does it work for you?
Someone (you?) suggested this earlier, on IRC. I explored but I could not figure out how to use it -- I implemented something else. TTN's suggestion of make-object-property appears to offer a simple solution -- based on what I just now read in the guile manual. Its not obviously simpler than doing what I implemented .. maybe it is, the devil is in the details (I have working code now, and have no desire to re-do it). I just thought I'd bring this up since its been a recurring need for me, and I figure others would have a similar need. --linas