File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 56
56
#endif
57
57
#endif
58
58
59
+ #if defined(MICROPY_UNIX_COVERAGE )
60
+ mp_obj_t common_hal_os_getenv (const char * key , mp_obj_t default_ );
61
+ #endif
62
+
59
63
STATIC mp_obj_t mod_os_urandom (mp_obj_t num ) {
60
64
mp_int_t n = mp_obj_get_int (num );
61
65
vstr_t vstr ;
@@ -193,12 +197,13 @@ STATIC mp_obj_t mod_os_system(mp_obj_t cmd_in) {
193
197
}
194
198
MP_DEFINE_CONST_FUN_OBJ_1 (mod_os_system_obj , mod_os_system );
195
199
196
- mp_obj_t common_hal_os_getenv (const char * key , mp_obj_t default_ );
197
200
STATIC mp_obj_t mod_os_getenv (mp_obj_t var_in ) {
201
+ #if defined(MICROPY_UNIX_COVERAGE )
198
202
mp_obj_t result = common_hal_os_getenv (mp_obj_str_get_str (var_in ), mp_const_none );
199
203
if (result != mp_const_none ) {
200
204
return result ;
201
205
}
206
+ #endif
202
207
const char * s = getenv (mp_obj_str_get_str (var_in ));
203
208
if (s == NULL ) {
204
209
return mp_const_none ;
You can’t perform that action at this time.
0 commit comments