[issue33406] [ctypes] increase refcount of a CFUNCTYPE instance when passing to a CDLL

2018-05-02 Thread Ned Deily
Change by Ned Deily : -- nosy: +amaury.forgeotdarc, belopolsky, meador.inge ___ Python tracker ___

[issue33406] [ctypes] increase refcount of a CFUNCTYPE instance when passing to a CDLL

2018-05-02 Thread Zuzu_Typ
New submission from Zuzu_Typ : It should be considered to increase the refcount of functions that are passed on to an external library at some point. If this is not done and e.g. the function was a local variable, when leaving the scope it gets garbage-collected. When the