Author: Armin Rigo <[email protected]>
Branch: stmgc-c7-rewindjmp
Changeset: r72804:0d4e673c7370
Date: 2014-08-14 17:31 +0200
http://bitbucket.org/pypy/pypy/changeset/0d4e673c7370/
Log: Accept set(NULL)
diff --git a/rpython/rlib/rthread.py b/rpython/rlib/rthread.py
--- a/rpython/rlib/rthread.py
+++ b/rpython/rlib/rthread.py
@@ -322,8 +322,9 @@
from rpython.rlib.objectmodel import running_on_llinterp
ptr = cast_instance_to_base_ptr(value)
if not running_on_llinterp:
- gcref = lltype.cast_opaque_ptr(llmemory.GCREF, ptr)
- _make_sure_does_not_move(gcref)
+ if ptr:
+ gcref = lltype.cast_opaque_ptr(llmemory.GCREF, ptr)
+ _make_sure_does_not_move(gcref)
llop.threadlocalref_set(lltype.Void, opaque_id, ptr)
ensure_threadlocal()
else:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit