[pypy-svn] r23118 - pypy/dist/pypy/rpython/memory
cfbolz at codespeak.net
cfbolz at codespeak.net
Tue Feb 7 19:23:56 CET 2006
Author: cfbolz
Date: Tue Feb 7 19:23:54 2006
New Revision: 23118
Modified:
pypy/dist/pypy/rpython/memory/gctransform.py
Log:
fixing names: this works for all types now, not only for arrays
Modified: pypy/dist/pypy/rpython/memory/gctransform.py
==============================================================================
--- pypy/dist/pypy/rpython/memory/gctransform.py (original)
+++ pypy/dist/pypy/rpython/memory/gctransform.py Tue Feb 7 19:23:54 2006
@@ -406,13 +406,13 @@
pass
destructor.compute_ll_ops = compute_destructor_ll_ops
destructor.llresult = lltype.Void
- def decref(array):
- arrayadr = objectmodel.cast_ptr_to_adr(array)
- gcheader = arrayadr - RefcountingGCTransformer.gc_header_offset
+ def decref(obj):
+ objadr = objectmodel.cast_ptr_to_adr(obj)
+ gcheader = objadr - RefcountingGCTransformer.gc_header_offset
refcount = gcheader.signed[0] - 1
gcheader.signed[0] = refcount
if refcount == 0:
- destructor(array)
+ destructor(obj)
g = self.translator.rtyper.annotate_helper(decref, [lltype.Ptr(TYPE)])
# the produced deallocator graph does not need to be transformed
self.seen_graphs[g] = True
More information about the Pypy-commit
mailing list