From 6f4f06f1b1f69734438d201da9abfb1660b31c37 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Fri, 5 Jul 2024 13:52:03 -0400 Subject: [PATCH] xo-pyjit: + reflect fyunction type so can declare vars w/ that type --- src/pyjit/pyjit.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/pyjit/pyjit.cpp b/src/pyjit/pyjit.cpp index 184fb309..04cfd968 100644 --- a/src/pyjit/pyjit.cpp +++ b/src/pyjit/pyjit.cpp @@ -17,6 +17,7 @@ namespace xo { using xo::ast::llvmintrinsic; using xo::pyutil::pycaller_base; using xo::pyutil::pycaller; + using xo::reflect::Reflect; using xo::ref::rp; //using xo::ref::Refcount; using xo::ref::unowned_ptr; @@ -54,6 +55,11 @@ namespace xo { { using caller_type = pycaller; + /* we want native function type reflected; + * need this so we can declare function-valued variables + */ + Reflect::require(); + caller_type::declare_once(m, pycaller_id_str); /* factory function takes function pointer of type