From ab8c50664772b413ca014302e15ddfc64f2db189 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Thu, 19 Nov 2020 14:20:45 +0100 Subject: [PATCH] :art: new_object_str (swig helper) --- include/import.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/import.h b/include/import.h index eab366a8..50434e96 100644 --- a/include/import.h +++ b/include/import.h @@ -52,4 +52,9 @@ OP_CHECK(opck_usr_implicit); OP_CHECK(opck_new); OP_EMIT(opem_new); +ANN2(1,3) static inline M_Object new_object_str(const Gwion gwion, const VM_Shred shred, const m_str str) { + struct loc_t_ loc = {}; + DECL_OO(const Type, t, = str2type(gwion, str, &loc)) + return new_object(gwion->mp, shred, t); +} #endif -- 2.43.0