[issue45898] ctypes cfield.c defines duplicate ffi_type_* symbols

2022-02-24 Thread Christian Heimes
Christian Heimes added the comment: I have applied the patch to main branch (3.11). The workaround for Windows turned out to be more elaborate than initially anticipated. I'm not going to backport the fix to 3.10 and 3.9. -- resolution: -> fixed stage: patch review -> resolved statu

[issue45898] ctypes cfield.c defines duplicate ffi_type_* symbols

2022-02-24 Thread Christian Heimes
Christian Heimes added the comment: New changeset 38f331d4656394ae0f425568e26790ace778e076 by Christian Heimes in branch 'main': bpo-45898: Remove duplicate symbols from _ctypes/cfield.c (GH-29791) https://github.com/python/cpython/commit/38f331d4656394ae0f425568e26790ace778e076 --

[issue45898] ctypes cfield.c defines duplicate ffi_type_* symbols

2021-11-26 Thread Steve Dower
Steve Dower added the comment: This is because we use libffi as a DLL and you can't statically reference dynamically loaded addresses on Windows. You could change that format table to be initialised on first use, or resolve the FFI type lazily. Or change ctypes to statically link libffi (inc

[issue45898] ctypes cfield.c defines duplicate ffi_type_* symbols

2021-11-26 Thread Roman Yurchak
Change by Roman Yurchak : -- nosy: +Roman Yurchak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue45898] ctypes cfield.c defines duplicate ffi_type_* symbols

2021-11-26 Thread Christian Heimes
Christian Heimes added the comment: Windows tests are failing without ffi_type_ symbols: cfield.obj : error LNK2001: unresolved external symbol _ffi_type_double [D:\a\cpython\cpython\PCbuild\_ctypes.vcxproj] cfield.obj : error LNK2001: unresolved external symbol _ffi_type_float [D:\a\cpython

[issue45898] ctypes cfield.c defines duplicate ffi_type_* symbols

2021-11-26 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +28026 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29791 ___ Python tracker ___

[issue45898] ctypes cfield.c defines duplicate ffi_type_* symbols

2021-11-25 Thread Christian Heimes
New submission from Christian Heimes : ctypes's cfield.c redefines a couple of symbols like ffi_type_void and others. The symbols are exported by ffi.h and libffi for more than 12 years: https://github.com/libffi/libffi/blame/e1539266e6c6dde3c99832323586f33f977d1dc0/include/ffi.h.in#L184 I th