summaryrefslogtreecommitdiff
path: root/py/objfun.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/objfun.c')
-rw-r--r--py/objfun.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/py/objfun.c b/py/objfun.c
index e0c25771e..4690dc6c8 100644
--- a/py/objfun.c
+++ b/py/objfun.c
@@ -1,11 +1,7 @@
#include <stdbool.h>
-#include <stdlib.h>
#include <string.h>
#include <assert.h>
-#ifdef __MINGW32__
-// For alloca()
-#include <malloc.h>
-#endif
+#include <alloca.h>
#include "mpconfig.h"
#include "nlr.h"
@@ -131,8 +127,9 @@ const char *mp_obj_code_get_name(const byte *code_info) {
return qstr_str(block_name);
}
-const char *mp_obj_fun_get_name(mp_obj_fun_bc_t *o) {
- const byte *code_info = o->bytecode;
+const char *mp_obj_fun_get_name(mp_obj_t fun_in) {
+ mp_obj_fun_bc_t *fun = fun_in;
+ const byte *code_info = fun->bytecode;
return mp_obj_code_get_name(code_info);
}