unix/modos: Fix silly bugs in ilistdir tuple creation.
This commit is contained in:
parent
3386477b29
commit
a1528364b3
@ -182,12 +182,12 @@ STATIC mp_obj_t listdir_next(mp_obj_t self_in) {
|
|||||||
t->items[1] = MP_OBJ_NEW_SMALL_INT(dirent->d_type);
|
t->items[1] = MP_OBJ_NEW_SMALL_INT(dirent->d_type);
|
||||||
#else
|
#else
|
||||||
// DT_UNKNOWN should have 0 value on any reasonable system
|
// DT_UNKNOWN should have 0 value on any reasonable system
|
||||||
t->items[1] = 0;
|
t->items[1] = MP_OBJ_NEW_SMALL_INT(0);
|
||||||
#endif
|
#endif
|
||||||
#if !defined(_DIRENT_HAVE_D_INO) || _DIRENT_HAVE_D_INO
|
#if !defined(_DIRENT_HAVE_D_INO) || _DIRENT_HAVE_D_INO
|
||||||
t->items[2] = MP_OBJ_NEW_SMALL_INT(dirent->d_ino);
|
t->items[2] = MP_OBJ_NEW_SMALL_INT(dirent->d_ino);
|
||||||
#else
|
#else
|
||||||
t->items[1] = MP_OBJ_NEW_SMALL_INT(0);
|
t->items[2] = MP_OBJ_NEW_SMALL_INT(0);
|
||||||
#endif
|
#endif
|
||||||
return MP_OBJ_FROM_PTR(t);
|
return MP_OBJ_FROM_PTR(t);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user