Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
use getfield instead of eval for getting type by name
Browse files Browse the repository at this point in the history
  • Loading branch information
julbinb committed Feb 18, 2021
1 parent bfb9c8e commit a818a07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/persistence/lg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function _parse_header(s::AbstractString)
if occursin(",", graphname) # version number and type
graphname, _ver, _dtype, graphcode = split(graphname, r"s*,s*")
ver = parse(Int, _ver)
dtype = eval(Symbol(_dtype))
dtype = getfield(Main, Symbol(_dtype))
addl_info = true
end
n_v = parse(Int, nvstr)
Expand Down

0 comments on commit a818a07

Please sign in to comment.