Skip to content

Commit

Permalink
export @t8_replace_callback (#62)
Browse files Browse the repository at this point in the history
* export `@t8_replace_callback`

* add docstrings

* bump version
  • Loading branch information
ranocha authored Mar 20, 2024
1 parent 3dee1b2 commit cf22750
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "T8code"
uuid = "d0cc0030-9a40-4274-8435-baadcfd54fa1"
authors = ["Johannes Markert <[email protected]>"]
version = "0.5.3"
version = "0.5.4"

[deps]
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82"
Expand Down
13 changes: 13 additions & 0 deletions src/T8code.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ include("Libt8.jl")
@reexport using .Libt8

export @t8_adapt_callback
export @t8_replace_callback
export @T8_ASSERT
export t8_free

Expand Down Expand Up @@ -180,6 +181,12 @@ end
# const int is_family,
# const int num_elements,
# t8_element_t *elements[]);
"""
@t8_adapt_callback(callback)
Wrap the Julia function `callback` in an `@cfunction` with the appropriate
signature required for callback functions in [`t8_forest_adapt`](@ref).
"""
macro t8_adapt_callback(callback)
:(@cfunction($callback, Cint,
(Ptr{t8_forest}, Ptr{t8_forest}, t8_locidx_t, t8_locidx_t,
Expand All @@ -194,6 +201,12 @@ end
# t8_locidx_t first_outgoing,
# int num_incoming,
# t8_locidx_t first_incoming);
"""
@t8_replace_callback(callback)
Wrap the Julia function `callback` in an `@cfunction` with the appropriate
signature required for callback functions in [`t8_forest_iterate_replace`](@ref).
"""
macro t8_replace_callback(callback)
:(@cfunction($callback, Cvoid,
(Ptr{Cvoid}, Ptr{Cvoid}, t8_locidx_t, Ptr{Cvoid}, Cint, Cint, t8_locidx_t,
Expand Down

2 comments on commit cf22750

@JoshuaLampert
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/103268

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.5.4 -m "<description of version>" cf227507e371ebcf9978d6ad78499901d99a2d5a
git push origin v0.5.4

Please sign in to comment.