Skip to content

Commit

Permalink
Replace ccall by Base helper
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed Aug 28, 2021
1 parent 8c40adc commit 289bd53
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/OSMPBF.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,7 @@ module OSMPBF
set_defaults!(::SimpleProtoType) = nothing
function ProtoBuf.clear(obj::SimpleProtoType)
# FIXME how does it play with GC ?
ccall(
:memset,
Ptr{Nothing},
(Ptr{Nothing}, Cint, Csize_t),
pointer_from_objref(obj),
0,
sizeof(typeof(obj)),
)
Base.unsafe_securezero!(pointer_from_objref(obj), sizeof(typeof(obj)))
set_defaults!(obj)
return
end
Expand Down

0 comments on commit 289bd53

Please sign in to comment.