gap: switch to libgap API for GAP function calls #35887
Merged
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.
📚 Description
Switch to the official libgap API for making function calls.
This also simplifies the code quite a bit.And it makes it possible to call non-standard GAP functions (i.e. functions which are notT_FUNCTION
but just an arbitrary objects for which a function call method has been installed).As a caveat, I could not try this at all, as I currently cannot compile SageMath (it runs into weird errors, and I don't have time to debug this, sorry). In particular I just looked at the Cython documentation to find out how to get a raw pointer to the content of an array; but I am not even sure that I got the syntax right, let alone the semantics. But I figured it's worth a shot.UPDATE: I decided to not try to use
GAP_CallFuncArray
anymore; it just is impossible for me to figure out the right way to call it from Cython when I can only test my changes by pushing them here. Instead a more modest but hopefully less problematic approach is now used.📝 Checklist
⌛ Dependencies