aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2021-01-28 11:46:28 +0200
committerMatti Picus <matti.picus@gmail.com>2021-01-28 11:46:28 +0200
commit58a882e1395524e470cf87c5a4c5acdaeac8e914 (patch)
tree0059ff644da3a5b163ae68d85e5a4494a4ab6067 /rpython/rtyper
parentre-apply backed out changes from rpython-never-allocate (diff)
parentunify 'hints' and '_hints' to '_hints' (diff)
downloadpypy-58a882e1395524e470cf87c5a4c5acdaeac8e914.tar.gz
pypy-58a882e1395524e470cf87c5a4c5acdaeac8e914.tar.bz2
pypy-58a882e1395524e470cf87c5a4c5acdaeac8e914.zip
remerge fixes from rpython-never-allocate
Diffstat (limited to 'rpython/rtyper')
-rw-r--r--rpython/rtyper/lltypesystem/ll2ctypes.py6
-rw-r--r--rpython/rtyper/lltypesystem/lltype.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/rpython/rtyper/lltypesystem/ll2ctypes.py b/rpython/rtyper/lltypesystem/ll2ctypes.py
index d9fdd322d7..efa6f11a2f 100644
--- a/rpython/rtyper/lltypesystem/ll2ctypes.py
+++ b/rpython/rtyper/lltypesystem/ll2ctypes.py
@@ -374,9 +374,9 @@ def build_new_ctypes_type(T, delayed_builders):
elif isinstance(T, lltype.OpaqueType):
if T is lltype.RuntimeTypeInfo:
return ctypes.c_char * 2
- if T.hints.get('external', None) != 'C':
+ if T._hints.get('external', None) != 'C':
raise TypeError("%s is not external" % T)
- return ctypes.c_char * T.hints['getsize']()
+ return ctypes.c_char * T._hints['getsize']()
else:
_setup_ctypes_cache()
if T in _ctypes_cache:
@@ -934,7 +934,7 @@ def lltype2ctypes(llobj, normalize=True):
convert_array(container)
elif isinstance(T.TO, lltype.OpaqueType):
if T.TO != lltype.RuntimeTypeInfo:
- cbuf = ctypes.create_string_buffer(T.TO.hints['getsize']())
+ cbuf = ctypes.create_string_buffer(T.TO._hints['getsize']())
else:
cbuf = ctypes.create_string_buffer("\x00")
cbuf = ctypes.cast(cbuf, ctypes.c_void_p)
diff --git a/rpython/rtyper/lltypesystem/lltype.py b/rpython/rtyper/lltypesystem/lltype.py
index eaa51f1edc..c75fd90e7a 100644
--- a/rpython/rtyper/lltypesystem/lltype.py
+++ b/rpython/rtyper/lltypesystem/lltype.py
@@ -584,7 +584,7 @@ class OpaqueType(ContainerType):
"""
self.tag = tag
self.__name__ = tag
- self.hints = frozendict(hints)
+ self._hints = frozendict(hints)
def __str__(self):
return "%s (opaque)" % self.tag