summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
Diffstat (limited to 'py')
-rw-r--r--py/objfun.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/py/objfun.c b/py/objfun.c
index 052f4b1ce..178f83443 100644
--- a/py/objfun.c
+++ b/py/objfun.c
@@ -355,6 +355,10 @@ void mp_obj_fun_bc_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) {
if (attr == MP_QSTR___name__) {
dest[0] = MP_OBJ_NEW_QSTR(mp_obj_fun_get_name(self_in));
}
+ if (attr == MP_QSTR___globals__) {
+ mp_obj_fun_bc_t *self = MP_OBJ_TO_PTR(self_in);
+ dest[0] = MP_OBJ_FROM_PTR(self->globals);
+ }
}
#endif