|
16 | 16 | - `--allow-gnu-c` replaced by `-X __GNUC__`.
|
17 | 17 | - More flags changed or renamed.
|
18 | 18 | * The library loader does not implicitly search in the module's relative directory anymore. Add relevant libdirs explicitly.
|
19 |
| -* All strings interfacing with the C extension have to be encoded as bytes. We do not do implicit UTF-8 encoding/decoding. (A new, opt-in string helper might be added in the future.) |
| 19 | +* All strings interfacing with the C extension have to be encoded as bytes. We do not support implicit UTF-8 encoding/decoding. (A new, opt-in string helper might be added in the future.) |
20 | 20 | * We declare `c_void_p` as restype directly, which ctypes auto-converts to int/None. Previously, ctypesgen would use `POINTER(c_ubyte)` and cast to `c_void_p` via errcheck to bypass the auto-conversion. However, a `c_void_p` programatically is just that: an integer or null pointer, so the behavior of ctypes seems fine. Note that we can seamlessly `ctypes.cast()` an int to a pointer type. The API difference is that there is no `.value` property anymore. Instead, the object itself is the value, removing a layer of indirection.
|
21 | 21 |
|
22 | 22 | See also `--help` for usage details.
|
23 | 23 |
|
24 | 24 | ### New features and improvements (selection)
|
25 | 25 |
|
26 | 26 | * Implemented relative imports with `--link-modules`, and library handle sharing with `--no-embed-templates`. Removed incorrect `POINTER` override that breaks the type system.
|
27 |
| -* Prevent assignment of invalid struct fields. |
| 27 | +* Prevent assignment of invalid struct fields by setting slots *in the class body*. |
28 | 28 | * Slimmed up template by removing many avoidable wrappers.
|
29 |
| -* Rewrote library loader. Resolve `.` to the module directory, not the caller's CWD. Don't add compile libdirs to runtime. |
| 29 | +* Rewrote library loader. Resolve `.` to the module directory, not the caller's CWD. Don't add compile libdirs to runtime. Handle iOS (PEP 730). |
30 | 30 | * Better control over symbol inclusion via `--symbol-rules` (exposes `if_needed` strategy, allows free order of actions).
|
31 | 31 | * Symbol regex matching uses `fullmatch()` rather than `match()` (more explicit).
|
32 | 32 | * Eagerly include direct members with `--system-headers`. This helps lower the need for `--all-headers` (which generally includes a lot more than necessary).
|
33 | 33 | * Auto-detect default pre-processor.
|
34 | 34 | * Handle FAMs (Flexible Array members) as zero-sized arrays. See https://github.com/ctypesgen/ctypesgen/issues/219.
|
35 |
| -* Changed the `UNCHECKED()` template to only remap non-primitive pointer types, and pass through anything else as-is. This avoids erroneously changing non-pointer types or `None` to `c_void_p`. |
| 35 | +* Tightened `UNCHECKED()` template to only remap pointer types, and pass through anything else as-is. This avoids erroneously changing non-pointer types or `None` to `c_void_p`. |
36 | 36 | * `-X`: Ability to override arbitrary pre-processor default flags added by ctypesgen.
|
37 |
| -* Pass through `-D/-U` in given order, i.e. honor undefines overriding defines, and vice versa. |
| 37 | +* Pass through `-D/-U` in given order. |
38 | 38 |
|
39 | 39 |
|
40 | 40 | ## Historical
|
|
0 commit comments