homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Jeffrey.Kintscher
Recipients Jeffrey.Kintscher, amaury.forgeotdarc, belopolsky, lauri.alanko, meador.inge
Date 2019年05月14日.21:35:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1557869757.35.0.855738087924.issue18060@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019年05月14日 21:35:57Jeffrey.Kintschersetrecipients: + Jeffrey.Kintscher, amaury.forgeotdarc, belopolsky, meador.inge, lauri.alanko
2019年05月14日 21:35:57Jeffrey.Kintschersetmessageid: <1557869757.35.0.855738087924.issue18060@roundup.psfhosted.org>
2019年05月14日 21:35:57Jeffrey.Kintscherlinkissue18060 messages
2019年05月14日 21:35:57Jeffrey.Kintschercreate

AltStyle によって変換されたページ (->オリジナル) /