Author: Alex Gaynor <[email protected]>
Branch: numpy-dtype-refactor
Changeset: r49969:fc7d508c2176
Date: 2011-11-29 10:15 -0500
http://bitbucket.org/pypy/pypy/changeset/fc7d508c2176/
Log: translation fix
diff --git a/pypy/module/micronumpy/interp_dtype.py
b/pypy/module/micronumpy/interp_dtype.py
--- a/pypy/module/micronumpy/interp_dtype.py
+++ b/pypy/module/micronumpy/interp_dtype.py
@@ -14,6 +14,9 @@
BOOLLTR = "b"
FLOATINGLTR = "f"
+
+VOID_STORAGE = lltype.Array(lltype.Char, hints={'nolength': True,
'render_as_void': True})
+
class W_Dtype(Wrappable):
def __init__(self, itemtype, num, kind, name, char, w_box_type,
alternate_constructors=[]):
self.signature = signature.BaseSignature()
@@ -27,7 +30,7 @@
def malloc(self, length):
# XXX find out why test_zjit explodes with tracking of allocations
- return lltype.malloc(rffi.CArray(lltype.Char),
self.itemtype.get_element_size() * length,
+ return lltype.malloc(VOID_STORAGE, self.itemtype.get_element_size() *
length,
zero=True, flavor="raw",
track_allocation=False, add_memory_pressure=True
)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit