[Pyrex] pyrex for parrots?
len-l at telus.net
len-l at telus.net
Fri May 27 06:09:35 CEST 2005
On 26 May 2005 at 15:51, Michal Wallace wrote:
> Thanks for the explanation. This actually helped a lot.
> Turns out parrot has a function that emulates refcounting.
> Basically it's a hash with a counter... It holds a reference
> to the object as long as the counter is > 0. So if eliminating
> the Py_INCREF and Py_DECREF macros entirely doesn't work,
> they should be able to call parrot's function.
>
To work I believe the "reference count" of a parrot object entering Python space
would have to be incremented, and decremented when leaving. This means the
boundary between Parrot and Python space needs to be well defined. Especially
important, python objects are created with a reference count of one.
I hope it works out.
Lenard Lindstrom
<len-l at telus.net>
More information about the Pyrex
mailing list