Author: Maciej Fijalkowski <[email protected]>
Branch: numpy-record-dtypes
Changeset: r52164:74884273c3e5
Date: 2012-02-07 13:04 +0200
http://bitbucket.org/pypy/pypy/changeset/74884273c3e5/
Log: more hacking
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
@@ -213,8 +213,6 @@
return min(v1, v2)
class NonNativePrimitive(object):
- _mixin_ = True
-
def _read(self, storage, width, i, offset):
return byteswap(Primitive._read(self, storage, width, i, offset))
@@ -540,13 +538,15 @@
del tp
def _setup():
+ from pypy.tool.sourcetools import func_with_new_name
+
for name, tp in globals().items():
if isinstance(tp, type):
class NonNative(tp):
pass
for item, v in NonNativePrimitive.__dict__.items():
if not item.startswith('__'):
- setattr(NonNative, item, v)
+ setattr(NonNative, item, func_with_new_name(v, item))
NonNative.__name__ = 'NonNative' + name
globals()[NonNative.__name__] = NonNative
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit