Skip to content

Commit

Permalink
Mention @Wrap changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Jun 6, 2024
1 parent 6ca6c5b commit 56121c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
- Allow `GapInt(x)` as shorthand for producing a GAP integer
- Show an error when trying to load GAP.jl while multithreaded GC is enabled
- Support `gap_to_julia(::AbstractVector)`
- Enhance `@wrap` so that it can produce wrapper functions which coerce
arguments to GAP objects (see its docstring for details and examples)
- Various janitorial changes

## Version 0.11.0 (released 2024-04-05)
Expand Down
5 changes: 3 additions & 2 deletions src/macros.jl
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,9 @@ However, the generated function actually caches the GAP object `GAP.Globals.NAME
This minimizes the call overhead. So @wrap typically is used to provide an optimized
way to call certain GAP functions.
If an argument is annotated as `::GapObj`, the resulting function accepts arguments
of any type and wraps them in `GapObj(...)` before passing them to the GAP function.
If an argument is annotated as `::GapObj` (respectively `::GAP.Obj` or `::GapInt`),
the resulting function accepts arguments of any type and attempts to convert them
to `GapObj` (respectively `GAP.Obj` or `GapInt`) before passing them to the GAP function.
Another use case for this macro is to improve type stability of code calling into
GAP, via the type annotations for the arguments and return value contained in the
Expand Down

0 comments on commit 56121c1

Please sign in to comment.