Skip to content

Commit a04369e

Browse files
committed
add ifdef-guard
1 parent 1a3b12a commit a04369e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

py/objarray.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ STATIC mp_obj_t memoryview_make_new(const mp_obj_type_t *type_in, size_t n_args,
239239
return MP_OBJ_FROM_PTR(self);
240240
}
241241

242+
#if MICROPY_CPYTHON_COMPAT
242243
STATIC mp_obj_t memoryview_cast(const mp_obj_t self_in, const mp_obj_t typecode_in) {
243244
mp_obj_array_t *self = MP_OBJ_TO_PTR(self_in);
244245
const char *typecode = mp_obj_str_get_str(typecode_in);
@@ -257,6 +258,7 @@ STATIC mp_obj_t memoryview_cast(const mp_obj_t self_in, const mp_obj_t typecode_
257258
}
258259
STATIC MP_DEFINE_CONST_FUN_OBJ_2(memoryview_cast_obj, memoryview_cast);
259260
#endif
261+
#endif
260262

261263
STATIC mp_obj_t array_unary_op(mp_unary_op_t op, mp_obj_t o_in) {
262264
mp_obj_array_t *o = MP_OBJ_TO_PTR(o_in);

0 commit comments

Comments
 (0)