Coverage for src / cufile_patcher / cufile_types.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-04-11 15:06 +0000

1from __future__ import annotations 

2 

3import ctypes 

4 

5 

6class CUfileError(ctypes.Structure): 

7 _fields_ = [("err", ctypes.c_int), ("cu_err", ctypes.c_int)] 

8 

9 

10CUfileHandle_t = ctypes.c_void_p 

11 

12 

13class DescrUnion(ctypes.Union): 

14 _fields_ = [("fd", ctypes.c_int), ("handle", ctypes.c_void_p)] 

15 

16 

17class CUfileDescr(ctypes.Structure): 

18 _fields_ = [ 

19 ("type", ctypes.c_int), 

20 ("handle", DescrUnion), 

21 ("fs_ops", ctypes.c_void_p), 

22 ]