[issue18060] Updating _fields_ of a derived struct type yields a bad cif

2019-05-16 Thread Jeffrey Kintscher
Change by Jeffrey Kintscher : -- keywords: +patch pull_requests: +13285 stage: -> patch review ___ Python tracker ___ ___

[issue18060] Updating _fields_ of a derived struct type yields a bad cif

2019-05-16 Thread Jeffrey Kintscher
Jeffrey Kintscher added the comment: The t1.py test case calls both PyCStructUnionType_update_stgdict() and PyCStgDict_clone(), both of which are broken. The test case in t2.py is simpler than t1.py in that it only calls PyCStructUnionType_update_stgdict().

[issue18060] Updating _fields_ of a derived struct type yields a bad cif

2019-05-14 Thread Jeffrey Kintscher
Jeffrey Kintscher added the comment: The current behavior, stgdict->length = len; sets the number of elements in the class excluding its base classes. The new behavior of stgdict->length = ffi_ofs + len; sets the total number of elements in both the class and its base classes.

[issue18060] Updating _fields_ of a derived struct type yields a bad cif

2019-05-14 Thread Jeffrey Kintscher
Jeffrey Kintscher added the comment: While the fix works as advertised, it breaks a similar existing test case: == ERROR: test_positional_args (ctypes.test.test_structures.StructureTestCase)

[issue18060] Updating _fields_ of a derived struct type yields a bad cif

2019-05-14 Thread Jeffrey Kintscher
Jeffrey Kintscher added the comment: It still behaves as described in the 3.7 and master branches. The proposed fix works. I will submit a pull request. -- nosy: +websurfer5 versions: +Python 3.7, Python 3.8 ___ Python tracker

[issue18060] Updating _fields_ of a derived struct type yields a bad cif

2019-04-26 Thread Mark Lawrence
Change by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18060] Updating _fields_ of a derived struct type yields a bad cif

2014-10-03 Thread Mark Lawrence
Mark Lawrence added the comment: A one line change is given in msg189992 so is this correct or isn't it? -- nosy: +BreamoreBoy, amaury.forgeotdarc, belopolsky, meador.inge versions: +Python 3.4, Python 3.5 -Python 3.3 ___ Python tracker

[issue18060] Updating _fields_ of a derived struct type yields a bad cif

2013-05-25 Thread Lauri Alanko
New submission from Lauri Alanko: In Modules/_ctypes/stgdict.c:567 there is a suspicious line: stgdict-length = len; /* ADD ffi_ofs? */ That is, the length field of the stgdict is set to the number of fields in the immediate Structure class, and the number of fields in the parent