[pypy-svn] r46530 - pypy/dist/pypy/rpython/memory/gctransform

arigo at codespeak.net arigo at codespeak.net
Thu Sep 13 11:09:21 CEST 2007


Author: arigo
Date: Thu Sep 13 11:09:20 2007
New Revision: 46530

Modified:
   pypy/dist/pypy/rpython/memory/gctransform/boehm.py
Log:
Forgot this.  Hard to test though.


Modified: pypy/dist/pypy/rpython/memory/gctransform/boehm.py
==============================================================================
--- pypy/dist/pypy/rpython/memory/gctransform/boehm.py	(original)
+++ pypy/dist/pypy/rpython/memory/gctransform/boehm.py	Thu Sep 13 11:09:20 2007
@@ -160,6 +160,8 @@
 
 def ll_weakref_create(targetaddr):
     link = llop.boehm_malloc_atomic(llmemory.Address, sizeof_weakreflink)
+    if not link:
+        raise MemoryError
     plink = llmemory.cast_adr_to_ptr(link, lltype.Ptr(WEAKLINK))
     plink[0] = targetaddr
     llop.boehm_disappearing_link(lltype.Void, link, targetaddr)



More information about the Pypy-commit mailing list