diff options
author | Ronan Lamy <ronan.lamy@gmail.com> | 2020-04-18 20:28:23 +0100 |
---|---|---|
committer | Ronan Lamy <ronan.lamy@gmail.com> | 2020-04-18 20:28:23 +0100 |
commit | 6ef3ab34ae7749acbafa08c1690a9e0023ad2acb (patch) | |
tree | cccdc6b6da8fff5bad035a2d18562e5de7f32be5 /rpython/memory | |
parent | add jobs control, from issue 3187 (diff) | |
download | pypy-6ef3ab34ae7749acbafa08c1690a9e0023ad2acb.tar.gz pypy-6ef3ab34ae7749acbafa08c1690a9e0023ad2acb.tar.bz2 pypy-6ef3ab34ae7749acbafa08c1690a9e0023ad2acb.zip |
Modernize exec syntax in rpython/
Diffstat (limited to 'rpython/memory')
-rw-r--r-- | rpython/memory/gc/test/test_minimarkpage.py | 4 | ||||
-rw-r--r-- | rpython/memory/gctransform/refcounting.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/rpython/memory/gc/test/test_minimarkpage.py b/rpython/memory/gc/test/test_minimarkpage.py index 3f09637926..17679b5f76 100644 --- a/rpython/memory/gc/test/test_minimarkpage.py +++ b/rpython/memory/gc/test/test_minimarkpage.py @@ -96,11 +96,11 @@ def arena_collection_for_test(pagesize, pagelayout, fill_with_objects=False): holeaddr = pageaddr + hdrsize + i * size_block llarena.arena_reserve(holeaddr, llmemory.sizeof(llmemory.Address)) - exec '%s = holeaddr' % prev in globals(), locals() + exec('%s = holeaddr' % prev, globals(), locals()) prevhole = holeaddr prev = 'prevhole.address[0]' endaddr = pageaddr + hdrsize + 2*nusedblocks * size_block - exec '%s = endaddr' % prev in globals(), locals() + exec('%s = endaddr' % prev, globals(), locals()) assert ac._nuninitialized(page, size_class) == nuninitialized # ac.allocate_new_arena() diff --git a/rpython/memory/gctransform/refcounting.py b/rpython/memory/gctransform/refcounting.py index 58127e164a..f9d50775b2 100644 --- a/rpython/memory/gctransform/refcounting.py +++ b/rpython/memory/gctransform/refcounting.py @@ -234,7 +234,7 @@ def ll_deallocator(addr): 'EXC_INSTANCE_TYPE': self.translator.rtyper.exceptiondata.lltype_of_exception_value, 'll_call_destructor': ll_call_destructor, 'HDRPTR':lltype.Ptr(self.HDR)} - exec src in d + exec(src, d) this = d['ll_deallocator'] fptr = self.annotate_finalizer(this, [llmemory.Address], lltype.Void) self.static_deallocator_funcptrs[TYPE] = fptr |