[issue12836] ctypes.cast() creates circular reference in original object

2020-09-29 Thread Eryk Sun
Change by Eryk Sun : -- stage: -> needs patch versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.3 ___ Python tracker ___

[issue12836] ctypes.cast() creates circular reference in original object

2013-12-12 Thread Mark Dickinson
Mark Dickinson added the comment: Possibly, the result's b_objects needs to be a copy of the src's b_objects That sounds right to me. I can't really believe that the current behaviour is intentional. -- nosy: +mark.dickinson ___ Python tracker

[issue12836] ctypes.cast() creates circular reference in original object

2013-12-12 Thread Vinay Sajip
Vinay Sajip added the comment: Adding Thomas Heller to nosy to see if he can shed any light on this. -- nosy: +theller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12836 ___

[issue12836] ctypes.cast() creates circular reference in original object

2011-08-29 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: I can confirm that the same behaviour occur in Python 3.3, and this appears to be by design. There's a specific line in the cast() function in in Modules/_ctypes.c: rc = PyDict_SetItem(result-b_objects, index, src); This adds the source

[issue12836] ctypes.cast() creates circular reference in original object

2011-08-28 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: What action are you suggesting? Change ctypes code or its doc or something else. If the doc, please suggest a specific change. Can you test on 3.x? -- nosy: +terry.reedy title: cast() creates circular reference in original object -