From: Jérémie Astor Date: Thu, 19 Nov 2020 13:20:45 +0000 (+0100) Subject: :art: new_object_str (swig helper) X-Git-Tag: nightly~1143 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=ab8c50664772b413ca014302e15ddfc64f2db189;p=gwion.git :art: new_object_str (swig helper) --- 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