mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-08-01 21:50:21 +08:00
_type_ class attributes in ctypes, and fix ctypes.wintypes.BYTE (#13777)
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import sys
|
||||
from _ctypes import _CArgObject, _CField
|
||||
from ctypes import (
|
||||
Array,
|
||||
Structure,
|
||||
_Pointer,
|
||||
_SimpleCData,
|
||||
c_byte,
|
||||
c_char,
|
||||
c_char_p,
|
||||
c_double,
|
||||
@@ -24,7 +24,15 @@ from ctypes import (
|
||||
from typing import Any, TypeVar
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
BYTE = c_byte
|
||||
if sys.version_info >= (3, 12):
|
||||
from ctypes import c_ubyte
|
||||
|
||||
BYTE = c_ubyte
|
||||
else:
|
||||
from ctypes import c_byte
|
||||
|
||||
BYTE = c_byte
|
||||
|
||||
WORD = c_ushort
|
||||
DWORD = c_ulong
|
||||
CHAR = c_char
|
||||
|
||||
Reference in New Issue
Block a user