Author: Armin Rigo <[email protected]>
Branch: cpyext-gc-support
Changeset: r80350:c6004c0c00ee
Date: 2015-10-20 12:00 +0200
http://bitbucket.org/pypy/pypy/changeset/c6004c0c00ee/

Log:    Test and fix

diff --git a/rpython/rlib/rawrefcount.py b/rpython/rlib/rawrefcount.py
--- a/rpython/rlib/rawrefcount.py
+++ b/rpython/rlib/rawrefcount.py
@@ -126,7 +126,7 @@
     _p_list = new_p_list
     for ob, wr in wr_p_list:
         p = attach(ob, wr, _p_list)
-        if p:
+        if p is not None:
             _pypy2ob[p] = ob
     _o_list = []
     for ob, wr in wr_o_list:
diff --git a/rpython/rlib/test/test_rawrefcount.py 
b/rpython/rlib/test/test_rawrefcount.py
--- a/rpython/rlib/test/test_rawrefcount.py
+++ b/rpython/rlib/test/test_rawrefcount.py
@@ -10,6 +10,8 @@
 class W_Root(object):
     def __init__(self, intval=0):
         self.intval = intval
+    def __nonzero__(self):
+        raise Exception("you cannot do that, you must use space.is_true()")
 
 PyObjectS = lltype.Struct('PyObjectS',
                           ('c_ob_refcnt', lltype.Signed),
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to