Skip to content

Commit

Permalink
Update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
mara004 committed Feb 1, 2025
1 parent 9da5d76 commit 69e4da1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,25 @@
- `--allow-gnu-c` replaced by `-X __GNUC__`.
- More flags changed or renamed.
* The library loader does not implicitly search in the module's relative directory anymore. Add relevant libdirs explicitly.
* 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.)
* 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.)
* 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.

See also `--help` for usage details.

### New features and improvements (selection)

* Implemented relative imports with `--link-modules`, and library handle sharing with `--no-embed-templates`. Removed incorrect `POINTER` override that breaks the type system.
* Prevent assignment of invalid struct fields.
* Prevent assignment of invalid struct fields by setting slots *in the class body*.
* Slimmed up template by removing many avoidable wrappers.
* Rewrote library loader. Resolve `.` to the module directory, not the caller's CWD. Don't add compile libdirs to runtime.
* Rewrote library loader. Resolve `.` to the module directory, not the caller's CWD. Don't add compile libdirs to runtime. Handle iOS (PEP 730).
* Better control over symbol inclusion via `--symbol-rules` (exposes `if_needed` strategy, allows free order of actions).
* Symbol regex matching uses `fullmatch()` rather than `match()` (more explicit).
* Eagerly include direct members with `--system-headers`. This helps lower the need for `--all-headers` (which generally includes a lot more than necessary).
* Auto-detect default pre-processor.
* Handle FAMs (Flexible Array members) as zero-sized arrays. See https://github.com/ctypesgen/ctypesgen/issues/219.
* 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`.
* 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`.
* `-X`: Ability to override arbitrary pre-processor default flags added by ctypesgen.
* Pass through `-D/-U` in given order, i.e. honor undefines overriding defines, and vice versa.
* Pass through `-D/-U` in given order.


## Historical
Expand Down

0 comments on commit 69e4da1

Please sign in to comment.