Skip to content

Commit 875d273

Browse files
committed
fix to allow including user.c
1 parent be90333 commit 875d273

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

code/ulab.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ STATIC const mp_map_elem_t ulab_globals_table[] = {
132132
#if ULAB_HAS_SCIPY
133133
{ MP_ROM_QSTR(MP_QSTR_scipy), MP_ROM_PTR(&ulab_scipy_module) },
134134
#endif
135-
#if ULAB_USER_MODULE
135+
#if ULAB_HAS_USER_MODULE
136136
{ MP_ROM_QSTR(MP_QSTR_user), MP_ROM_PTR(&ulab_user_module) },
137137
#endif
138138
};

code/user/user.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "py/misc.h"
1818
#include "user.h"
1919

20-
#if ULAB_USER_MODULE
20+
#if ULAB_HAS_USER_MODULE
2121

2222
//| """This module should hold arbitrary user-defined functions."""
2323
//|
@@ -80,12 +80,12 @@ static mp_obj_t user_square(mp_obj_t arg) {
8080

8181
MP_DEFINE_CONST_FUN_OBJ_1(user_square_obj, user_square);
8282

83-
STATIC const mp_rom_map_elem_t ulab_user_globals_table[] = {
83+
static const mp_rom_map_elem_t ulab_user_globals_table[] = {
8484
{ MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_user) },
8585
{ MP_OBJ_NEW_QSTR(MP_QSTR_square), (mp_obj_t)&user_square_obj },
8686
};
8787

88-
STATIC MP_DEFINE_CONST_DICT(mp_module_ulab_user_globals, ulab_user_globals_table);
88+
static MP_DEFINE_CONST_DICT(mp_module_ulab_user_globals, ulab_user_globals_table);
8989

9090
mp_obj_module_t ulab_user_module = {
9191
.base = { &mp_type_module },

code/user/user.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
#ifndef _USER_
1313
#define _USER_
1414

15-
#include "../ulab.h"
16-
#include "../ndarray.h"
15+
#include "ulab.h"
16+
#include "ndarray.h"
1717

1818
extern mp_obj_module_t ulab_user_module;
1919

0 commit comments

Comments
 (0)