summaryrefslogtreecommitdiff
path: root/py/runtime.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/runtime.c')
-rw-r--r--py/runtime.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/py/runtime.c b/py/runtime.c
index 9da568876..a1bd67636 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -319,6 +319,10 @@ static bool fit_small_int(py_small_int_t o) {
return true;
}
+py_obj_t py_obj_new_int(int value) {
+ return TO_SMALL_INT(value);
+}
+
py_obj_t py_obj_new_const(const char *id) {
py_obj_base_t *o = m_new(py_obj_base_t, 1);
o->kind = O_CONST;