WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.7% of users enabled 2FA.

Commit 755f7835 authored by John Zhang's avatar John Zhang
Browse files

fix: respond to 'render_as_void' hint for a correct translation of rffi.VOIDP

parent 3673a935
......@@ -212,6 +212,9 @@ class LL2MuMapper:
if LLT.OF is lltype.Void:
return mutype.MuStruct(name, ('length', mutype.MU_INT64))
if LLT._hints.get('render_as_void', False):
return mutype.MU_VOID
flds = [('items', self.map_type(LLT.OF))]
if not LLT._hints.get('nolength', False):
flds.insert(0, ('length', mutype.MU_INT64))
......@@ -30,6 +30,13 @@ def test_map_type_struct():
# cached
assert ll2mu.map_type(LLT) is MuT # calling a second time return the same object
def test_map_type_voidp():
from rpython.rtyper.lltypesystem.rffi import VOIDP
ll2mu = LL2MuMapper()
MuT = ll2mu.map_type(VOIDP)
assert MuT == mutype.MuUPtr(mutype.MU_VOID)
def test_map_type_hybrid():
ll2mu = LL2MuMapper()
from rpython.rtyper.lltypesystem.rstr import STR
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment