ctypes.POINTER(None) returns ctypes.c_void_p (#12754)

This commit is contained in:
Jun Komoda
2024-10-10 19:29:37 +09:00
committed by GitHub
parent 98f3e5772d
commit 1939ed1dc1
2 changed files with 12 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
from __future__ import annotations
import ctypes
from typing import Type
from typing_extensions import assert_type
assert_type(ctypes.POINTER(None), Type[ctypes.c_void_p])
assert_type(ctypes.POINTER(ctypes.c_int), Type[ctypes._Pointer[ctypes.c_int]])