Commit Graph

16 Commits

Author SHA1 Message Date
Nikita Sobolev
2c1db00761 Consistently use Generic as the last base class (#10610) 2023-08-28 10:16:54 +02:00
Nikita Sobolev
0aa5dd57e5 Update ctypes stubs for Python 3.12 (#10290)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-09 19:55:03 +01:00
Jelle Zijlstra
c0a0c34020 Use PEP 688 (#10225)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-05-27 19:55:30 -07:00
Jun Komoda
9457de310a update constructor args of the CFuncPtr to expand acceptable types (#10155)
* allow the second element of `_PF` to be `None`

* allow `__paramflags` to be `None`

* allow `__iid` to be `None` or `_CData`

* remove unused symbols
2023-05-07 07:32:58 -07:00
Jun Komoda
1d69fb3675 fix _ctypes.CFuncPtr constructor args (#10154)
* add a conditional branch for Windows only

* fix argname spelling
`vtlb_index` -> `vtbl_index`

* add an overload
for the case where no arguments are passed to the constructor

* mark all of the arguments as positional-only
2023-05-06 20:04:16 -07:00
Jun Komoda
a6ecf564b5 move and rename from ctypes._FuncPointer to _ctypes.CFuncPtr (#10140)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-05-06 10:17:34 -07:00
Jun Komoda
05c0a1d8b2 move byref-related definitions from ctypes/__init__.pyi to _ctypes.pyi (#10137) 2023-05-03 16:50:47 +01:00
Jun Komoda
01b09d4371 Move some pointer-related definitions from ctypes/__init__.pyi to _ctypes.pyi (#10133) 2023-05-03 10:04:13 +01:00
Jun Komoda
ce531f897f move some non-pointer-related definitions from ctypes/__init__.pyi to _ctypes.pyi (#10130)
- `ArgumentError`
- `addressof`
- `alignment`
- `get_errno`
- `resize`
- `set_errno`
- `sizeof`
2023-05-02 16:54:42 +01:00
Jun Komoda
bbeec7cbbf Move some Windows-specific things from ctypes/__init__.pyi to _ctypes.pyi (#10128)
- `FormatError`
- `get_last_error`
- `set_last_error`
2023-05-02 11:21:55 +01:00
Jun Komoda
295a5c3e7a Move Structure and Union from ctypes/__init__.pyi to _ctypes.pyi (#10125) 2023-05-01 13:01:41 +01:00
Jun Komoda
ae0c9f9dad Move _SimpleCData and Array from ctypes/__init__.pyi to _ctypes.pyi (#10118) 2023-04-30 21:22:46 +01:00
junkmd
1c6eb33c23 add and migrate constants from ctypes/__init__.pyi to _ctypes.pyi (#8643)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2022-08-29 15:33:47 +01:00
junkmd
179228370a Add win32-specific constants to _ctypes (#8614) 2022-08-25 16:22:06 +01:00
Nikita Sobolev
fed419b8f1 Add CTYPES_MAX_ARGCOUNT to _ctypes (#8601) 2022-08-23 14:52:16 -07:00
junkmd
2066b9533c _ctypes: add stubs (#8582)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: hauntsaninja <hauntsaninja@gmail.com>
2022-08-23 12:22:12 -07:00