summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorJun Komoda <45822440+junkmd@users.noreply.github.com>2024-12-03 15:35:08 (GMT)
committerGitHub <noreply@github.com>2024-12-03 15:35:08 (GMT)
commit412e11fe6e37f15971ef855f88b8b01bb3297679 (patch)
treefd182649ca5f4be09370b8bb0568d0f26d381ebe /Lib
parent979bf2489d0c59ae451b97d7e3c148f47e259f0b (diff)
downloadcpython-412e11fe6e37f15971ef855f88b8b01bb3297679.zip
cpython-412e11fe6e37f15971ef855f88b8b01bb3297679.tar.gz
cpython-412e11fe6e37f15971ef855f88b8b01bb3297679.tar.bz2
gh-127255: Make `CopyComPointer` public and add to `ctypes` doc. (GH-127275)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/ctypes/__init__.py2
-rw-r--r--Lib/test/test_ctypes/test_win32_com_foreign_func.py3
2 files changed, 2 insertions, 3 deletions
diff --git a/Lib/ctypes/__init__.py b/Lib/ctypes/__init__.py
index ac64938..2f2b0ca 100644
--- a/Lib/ctypes/__init__.py
+++ b/Lib/ctypes/__init__.py
@@ -19,7 +19,7 @@ if __version__ != _ctypes_version:
raise Exception("Version number mismatch", __version__, _ctypes_version)
if _os.name == "nt":
- from _ctypes import COMError, FormatError
+ from _ctypes import COMError, CopyComPointer, FormatError
DEFAULT_MODE = RTLD_LOCAL
if _os.name == "posix" and _sys.platform == "darwin":
diff --git a/Lib/test/test_ctypes/test_win32_com_foreign_func.py b/Lib/test/test_ctypes/test_win32_com_foreign_func.py
index 8d217fc..7e54f8f 100644
--- a/Lib/test/test_ctypes/test_win32_com_foreign_func.py
+++ b/Lib/test/test_ctypes/test_win32_com_foreign_func.py
@@ -9,8 +9,7 @@ if sys.platform != "win32":
raise unittest.SkipTest("Windows-specific test")
-from _ctypes import COMError, CopyComPointer
-from ctypes import HRESULT
+from ctypes import COMError, CopyComPointer, HRESULT
COINIT_APARTMENTTHREADED = 0x2