From eaf749280c92c4f1cc2c9078d66e326c4e069c48 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 17 Apr 2024 14:32:34 +0200 Subject: [PATCH] Convenience: allow GapInt(x) as shorthand for producing a GAP integer --- src/constructors.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/constructors.jl b/src/constructors.jl index 4e02af7b0..fa33f6096 100644 --- a/src/constructors.jl +++ b/src/constructors.jl @@ -9,6 +9,10 @@ GapObj(obj; recursive::Bool = false) = julia_to_gap(obj, IdDict(); recursive)::G Obj(obj, recursive::Bool) = julia_to_gap(obj, IdDict(); recursive)::Obj GapObj(obj, recursive::Bool) = julia_to_gap(obj, IdDict(); recursive)::GapObj +## Conversion to gap integers +GapInt(x::Integer) = julia_to_gap(x) + + """ BigInt(obj::GapObj)