Author: Armin Rigo <[email protected]>
Branch:
Changeset: r91159:fa2b7ecca667
Date: 2017-05-01 15:49 +0200
http://bitbucket.org/pypy/pypy/changeset/fa2b7ecca667/
Log: Issue #1213: in ctypes, complain instead of silently ignoring
_swappedbytes_
diff --git a/lib_pypy/_ctypes/structure.py b/lib_pypy/_ctypes/structure.py
--- a/lib_pypy/_ctypes/structure.py
+++ b/lib_pypy/_ctypes/structure.py
@@ -234,6 +234,9 @@
if ('_abstract_' in cls.__dict__ or cls is Structure
or cls is union.Union):
raise TypeError("abstract class")
+ if hasattr(cls, '_swappedbytes_'):
+ raise NotImplementedError("missing in PyPy: structure/union with "
+ "swapped (non-native) byte ordering")
if hasattr(cls, '_ffistruct_'):
self.__dict__['_buffer'] = self._ffistruct_(autofree=True)
return self
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit