Re: refcounts and DOD

2005-05-26 Thread Leopold Toetsch
Michal Wallace wrote: It seems that instead of looking at the *count* of references, the DOD system actually walks through the graph of references. So it seems you could fake refcounting just by adding references and removing pointers from somewhere in the tree that gets walked. Yes, as Nick

Re: refcounts and DOD

2005-05-26 Thread Dan Sugalski
At 6:08 PM -0400 5/25/05, Michal Wallace wrote: So I'm still thinking about a generic wrapper for python modules. I would like to be able to recompile the python standard library (and other libraries) to run on parrot with only a few minor patches. If you're doing this to make the python

refcounts and DOD

2005-05-25 Thread Michal Wallace
Hi all, So I'm still thinking about a generic wrapper for python modules. I would like to be able to recompile the python standard library (and other libraries) to run on parrot with only a few minor patches. I realize this is probably completely foolish, but I'm lazy, so... :) I've done

Re: refcounts and DOD

2005-05-25 Thread Nicholas Clark
On Wed, May 25, 2005 at 06:08:42PM -0400, Michal Wallace wrote: So: Py_INCREF(x) could be rewritten to (for example) append a reference to x in a parrot array, and Py_DECREF(x) would pop it off the array. I think that you can use Parrot_register_pmc and Parrot_unregister_pmc IIRC they count