Commit fb5967f 1 parent 235b47f commit fb5967f Copy full SHA for fb5967f
File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 1
1
name = " T8code"
2
2
uuid = " d0cc0030-9a40-4274-8435-baadcfd54fa1"
3
3
authors = [
" Johannes Markert <[email protected] >" ]
4
- version = " 0.7.1 "
4
+ version = " 0.7.2 "
5
5
6
6
[deps ]
7
7
CEnum = " fa961155-64e5-5f13-b03f-caf6b980ea82"
Original file line number Diff line number Diff line change @@ -212,6 +212,13 @@ mutable struct ForestWrapper
212
212
end
213
213
end
214
214
215
+ Base. pointer (fw:: ForestWrapper ) = fw. pointer
216
+ # This dispatched conversion allows to conveniently pass a ForestWrapper object
217
+ # to `t8_forest_...` calls. The following link leads to a lengthy discussion
218
+ # about if this is a valid way to achieve this:
219
+ # https://discourse.julialang.org/t/how-to-use-ccall-cconvert-and-unsafe-convert-in-a-convenient-and-memory-safe-way/41932/18
220
+ Base. unsafe_convert (:: Type{Ptr{t8_forest}} , fw:: ForestWrapper ) = fw. pointer
221
+
215
222
function clean_up ()
216
223
# Finalize all registered t8code objects before MPI shuts down.
217
224
while length (T8CODE_OBJECT_TRACKER) > 0
You can’t perform that action at this time.
0 commit comments