Repository navigation
Fix Nim 2.4 bindings while preserving older compiler support - #73
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pixie’s current value types expose generic aliases and explicit ABI fields that Genny could not emit consistently on Nim 2.4.0. This resolves aliases across every backend, supports explicit value layouts and normalized operator/openArray/sink signatures, and keeps the same bindings buildable with older Nim compilers.
The changes preserve the current Koffi and native CPython backends. Koffi now uses declared value structs and native value constructors. Generated Nim reference-field getters wrap the owned C pointer, preserve nil, and accept nil assignments; generated destructors use the signature required by Nim 1.x or 2.x. Existing output directories and CPython symbol-name buffers also work around older compile-time VM behavior.
Added regressions cover generic complex arithmetic, private array layouts, overloaded equality, repeated procedure exports, openArray and sink arguments, native Python values, and reference-field lifetime and final disposal. Nim and native Python CI now run on both 2.0.16 and 2.4.0.
Validation on macOS ARM64: