Author: Antonio Cuni <[email protected]>
Branch: jitypes2
Changeset: r44378:f93078f8a798
Date: 2011-05-23 12:13 +0200
http://bitbucket.org/pypy/pypy/changeset/f93078f8a798/
Log: add a property also for _com_index. Completely untested, it seems
there is no test at all for _com_index in general :-(
diff --git a/lib_pypy/_ctypes/function.py b/lib_pypy/_ctypes/function.py
--- a/lib_pypy/_ctypes/function.py
+++ b/lib_pypy/_ctypes/function.py
@@ -655,9 +655,13 @@
self.callable = func
callable = property(lambda: None, _setcallable)
+ def _setcom_index(self, idx):
+ self.__rollback()
+ self._com_index = idx
+ _com_index = property(lambda: None, _setcom_index)
+
def _are_assumptions_met(self, args):
- return (not self._com_index and
- self._errcheck_ is None)
+ return (self._errcheck_ is None)
def __call__(self, *args):
if not self._are_assumptions_met(args):
@@ -665,7 +669,6 @@
self.__class__ = CFuncPtr
return self(*args)
#
- assert not self._com_index
thisarg = None
argtypes = self._argtypes_
restype = self._restype_
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit