Commit e6b247c8 authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

bpo-35523: Remove ctypes callback workaround (GH-11211)

Remove ctypes callback workaround: no longer create a callback at startup.
Avoid SELinux alert on "import ctypes" and "import uuid".
parent 3fcc1e08
...@@ -266,11 +266,6 @@ def _reset_cache(): ...@@ -266,11 +266,6 @@ def _reset_cache():
# _SimpleCData.c_char_p_from_param # _SimpleCData.c_char_p_from_param
POINTER(c_char).from_param = c_char_p.from_param POINTER(c_char).from_param = c_char_p.from_param
_pointer_type_cache[None] = c_void_p _pointer_type_cache[None] = c_void_p
# XXX for whatever reasons, creating the first instance of a callback
# function is needed for the unittests on Win64 to succeed. This MAY
# be a compiler bug, since the problem occurs only when _ctypes is
# compiled with the MS SDK compiler. Or an uninitialized variable?
CFUNCTYPE(c_int)(lambda: None)
def create_unicode_buffer(init, size=None): def create_unicode_buffer(init, size=None):
"""create_unicode_buffer(aString) -> character array """create_unicode_buffer(aString) -> character array
......
Remove :mod:`ctypes` callback workaround: no longer create a callback at
startup. Avoid SELinux alert on ``import ctypes`` and ``import uuid``.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment