[plt-scheme] Re: Recognising primitive procedures

From: Marco Maggi (marco.maggi-ipsu at poste.it)
Date: Sat Jan 5 10:43:15 EST 2008

"Matthew Flatt" wrote:
>At Wed,  2 Jan 2008 22:08:04 +0100, "Marco Maggi" wrote:
>> I am using "scheme_make_closed_prim_w_arity()": I wonder if
>> there is a way to recognise the primitive procedure's
>> Scheme_Object
>> as one that my library has created, when the procedure is
>> as argument of another primitive procedure.

>Are there a small number of function pointers involved
(that is, if you
>create lots, it's because the data half of the closure
changes)? If so,
>you could check the function pointer when you see a value
tagged as

I create a lot of them, and I need to modify the data.
I have dropped the hash table and I am experimenting with
the tsearch/tfind/tdelete API of the GNU C Library (a tree),
with a "scheme_register_finalizer" handler to remove the
proc from the collection. It seems to work. 

Marco Maggi

"Now feel the funk blast!"
Rage Against the Machine - "Calm like a bomb"

Posted on the users mailing list.