Author: Alex Gaynor <[email protected]>
Branch: numpy-dtype-refactor-complex
Changeset: r50157:7d6deb08502d
Date: 2011-12-04 17:45 -0500
http://bitbucket.org/pypy/pypy/changeset/7d6deb08502d/
Log: fix for segfault, thanks to amaury!
diff --git a/pypy/module/micronumpy/types.py b/pypy/module/micronumpy/types.py
--- a/pypy/module/micronumpy/types.py
+++ b/pypy/module/micronumpy/types.py
@@ -408,11 +408,11 @@
def store(self, storage, width, i, offset, box):
subboxes = self.unbox(box)
- i = 0
+ item_idx = 0
for box in subboxes:
- self.itemtypes[i].store(storage, width, i, offset, box)
- offset += self.itemtypes[i].get_element_size()
- i += 1
+ self.itemtypes[item_idx].store(storage, width, i, offset, box)
+ offset += self.itemtypes[item_idx].get_element_size()
+ item_idx += 1
def read(self, storage, width, i, offset):
boxes = []
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit