Message342520
While the fix works as advertised, it breaks a similar existing test case:
======================================================================
ERROR: test_positional_args (ctypes.test.test_structures.StructureTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/jeff/sandbox/src/python3.7/cpython/Lib/ctypes/test/test_structures.py", line 390, in test_positional_args
z = Z(1, 2, 3, 4, 5, 6)
IndexError: list index out of range
----------------------------------------------------------------------
Below is the relevant test code:
class W(Structure):
_fields_ = [("a", c_int), ("b", c_int)]
class X(W):
_fields_ = [("c", c_int)]
class Y(X):
pass
class Z(Y):
_fields_ = [("d", c_int), ("e", c_int), ("f", c_int)]
z = Z(1, 2, 3, 4, 5, 6)
It similar but slightly different from the provided test case:
libm = CDLL(find_library('m'))
class Base(Structure):
_fields_ = [('y', c_double),
('x', c_double)]
class Mid(Base):
pass
Mid._fields_ = []
class Vector(Mid): pass
libm.atan2.argtypes = [Vector]
libm.atan2.restype = c_double
arg = Vector(y=0.0, x=-1.0)
I will do some more digging. |
|
Date |
User |
Action |
Args |
2019-05-14 21:35:57 | Jeffrey.Kintscher | set | recipients:
+ Jeffrey.Kintscher, amaury.forgeotdarc, belopolsky, meador.inge, lauri.alanko |
2019-05-14 21:35:57 | Jeffrey.Kintscher | set | messageid: <1557869757.35.0.855738087924.issue18060@roundup.psfhosted.org> |
2019-05-14 21:35:57 | Jeffrey.Kintscher | link | issue18060 messages |
2019-05-14 21:35:57 | Jeffrey.Kintscher | create | |
|