Skip to content

Commit cf22750

Browse files
authored
export @t8_replace_callback (#62)
* export `@t8_replace_callback` * add docstrings * bump version
1 parent 3dee1b2 commit cf22750

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "T8code"
22
uuid = "d0cc0030-9a40-4274-8435-baadcfd54fa1"
33
authors = ["Johannes Markert <[email protected]>"]
4-
version = "0.5.3"
4+
version = "0.5.4"
55

66
[deps]
77
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82"

src/T8code.jl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ include("Libt8.jl")
1818
@reexport using .Libt8
1919

2020
export @t8_adapt_callback
21+
export @t8_replace_callback
2122
export @T8_ASSERT
2223
export t8_free
2324

@@ -180,6 +181,12 @@ end
180181
# const int is_family,
181182
# const int num_elements,
182183
# t8_element_t *elements[]);
184+
"""
185+
@t8_adapt_callback(callback)
186+
187+
Wrap the Julia function `callback` in an `@cfunction` with the appropriate
188+
signature required for callback functions in [`t8_forest_adapt`](@ref).
189+
"""
183190
macro t8_adapt_callback(callback)
184191
:(@cfunction($callback, Cint,
185192
(Ptr{t8_forest}, Ptr{t8_forest}, t8_locidx_t, t8_locidx_t,
@@ -194,6 +201,12 @@ end
194201
# t8_locidx_t first_outgoing,
195202
# int num_incoming,
196203
# t8_locidx_t first_incoming);
204+
"""
205+
@t8_replace_callback(callback)
206+
207+
Wrap the Julia function `callback` in an `@cfunction` with the appropriate
208+
signature required for callback functions in [`t8_forest_iterate_replace`](@ref).
209+
"""
197210
macro t8_replace_callback(callback)
198211
:(@cfunction($callback, Cvoid,
199212
(Ptr{Cvoid}, Ptr{Cvoid}, t8_locidx_t, Ptr{Cvoid}, Cint, Cint, t8_locidx_t,

0 commit comments

Comments
 (0)