From a818a073c4049483bf457391dc97aebe864d2ac7 Mon Sep 17 00:00:00 2001 From: Julia Belyakova Date: Thu, 18 Feb 2021 12:06:29 -0500 Subject: [PATCH] use getfield instead of eval for getting type by name --- src/persistence/lg.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/persistence/lg.jl b/src/persistence/lg.jl index e87267778..8bc587e81 100644 --- a/src/persistence/lg.jl +++ b/src/persistence/lg.jl @@ -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)