Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for issue #44 - update to extxyz_jll v0.1.3 #45

Merged
merged 1 commit into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ StaticArrays = "1.5"
Unitful = "1"
UnitfulAtomic = "1"
julia = "1"
extxyz_jll = "0.1.3"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
7 changes: 4 additions & 3 deletions src/fileio.jl
Original file line number Diff line number Diff line change
Expand Up @@ -199,15 +199,16 @@ function convert(::Type{Ptr{DictEntry}}, dict::Dict{String}{Any}; ordered_keys=n
return c_dict_ptr
end

function read_frame_dicts(fp::Ptr{Cvoid}; verbose=false)
function read_frame_dicts(fp::Ptr{Cvoid}; verbose=false, comment=nothing)
nat = Ref{Cint}(0)
info = Ref{Ptr{DictEntry}}()
arrays = Ref{Ptr{DictEntry}}()
failed = false
(comment === nothing) && (comment = C_NULL)
try
res = ccall((:extxyz_read_ll, libextxyz),
Cint, (Ptr{Cvoid}, Ptr{Cvoid}, Ref{Cint}, Ptr{Ptr{DictEntry}}, Ptr{Ptr{DictEntry}}),
_kv_grammar[], fp, nat, info, arrays)
Cint, (Ptr{Cvoid}, Ptr{Cvoid}, Ref{Cint}, Ptr{Ptr{DictEntry}}, Ptr{Ptr{DictEntry}}, Cstring),
_kv_grammar[], fp, nat, info, arrays, comment)
if res != 1
failed = true
throw(EOFError())
Expand Down
Loading