|
|
60a36f2 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
42a4f96 |
From: David Malcolm <dmalcolm@redhat.com>
|
|
|
42a4f96 |
Date: Fri, 19 Jun 2020 16:02:24 +0200
|
|
|
42a4f96 |
Subject: [PATCH] 00155: avoid allocating thunks in ctypes unless absolutely
|
|
|
42a4f96 |
necessary
|
|
|
42a4f96 |
|
|
|
42a4f96 |
Avoid allocating thunks in ctypes unless absolutely necessary, to avoid
|
|
|
42a4f96 |
generating SELinux denials on "import ctypes" and "import uuid" when
|
|
|
42a4f96 |
embedding Python within httpd
|
|
|
42a4f96 |
See https://bugzilla.redhat.com/show_bug.cgi?id=814391
|
|
|
42a4f96 |
---
|
|
|
42a4f96 |
Lib/ctypes/__init__.py | 5 -----
|
|
|
42a4f96 |
1 file changed, 5 deletions(-)
|
|
|
42a4f96 |
|
|
|
42a4f96 |
diff --git a/Lib/ctypes/__init__.py b/Lib/ctypes/__init__.py
|
|
|
42a4f96 |
index dae408a867..f4178c0731 100644
|
|
|
42a4f96 |
--- a/Lib/ctypes/__init__.py
|
|
|
42a4f96 |
+++ b/Lib/ctypes/__init__.py
|
|
|
42a4f96 |
@@ -266,11 +266,6 @@ def _reset_cache():
|
|
|
490fd61 |
# _SimpleCData.c_char_p_from_param
|
|
|
490fd61 |
POINTER(c_char).from_param = c_char_p.from_param
|
|
|
490fd61 |
_pointer_type_cache[None] = c_void_p
|
|
|
490fd61 |
- # XXX for whatever reasons, creating the first instance of a callback
|
|
|
490fd61 |
- # function is needed for the unittests on Win64 to succeed. This MAY
|
|
|
490fd61 |
- # be a compiler bug, since the problem occurs only when _ctypes is
|
|
|
490fd61 |
- # compiled with the MS SDK compiler. Or an uninitialized variable?
|
|
|
490fd61 |
- CFUNCTYPE(c_int)(lambda: None)
|
|
|
490fd61 |
|
|
|
490fd61 |
def create_unicode_buffer(init, size=None):
|
|
|
490fd61 |
"""create_unicode_buffer(aString) -> character array
|