[Pyrex] pyrex for parrots?

Michal Wallace michal at sabren.com
Thu May 26 21:51:59 CEST 2005


On Wed, 25 May 2005 len-l at telus.net wrote:

> For a garbage collector to recognize that an object is alive, that
> object must either be directly or indirectly referenced by some
> special root object or internal pointer that by definition is
> alive. Python extension modules, Pyrex modules included, do not
> provide this anchoring (my term). It is unnecessary with reference
> counting.  Pyrex may reference a newly created python object with an
> ordinary local C pointer.  A garbage collector would know nothing
> about this references, so it would assume the object is dead.  >

Hi Lenard,

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.

Sincerely,

Michal J Wallace
Sabren Enterprises, Inc.
-------------------------------------
contact: michal at sabren.com
hosting: http://www.cornerhost.com/
my site: http://www.withoutane.com/
-------------------------------------




More information about the Pyrex mailing list