mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 09:50:15 +01:00
py/obj: Update with_finaliser version to match mp_obj_malloc_var.
Cleans up 2423493774, and fixes builds
that include LFS but not MICROPY_ENABLE_FINALISER.
Signed-off-by: Anson Mansfield <amansfield@mantaro.com>
This commit is contained in:
committed by
Damien George
parent
9e89c752cb
commit
a21d3f1975
@@ -90,9 +90,9 @@ mp_obj_t MP_VFS_LFSx(file_open)(mp_obj_t self_in, mp_obj_t path_in, mp_obj_t mod
|
||||
}
|
||||
|
||||
#if LFS_BUILD_VERSION == 1
|
||||
MP_OBJ_VFS_LFSx_FILE *o = mp_obj_malloc_var_with_finaliser(MP_OBJ_VFS_LFSx_FILE, uint8_t, self->lfs.cfg->prog_size, type);
|
||||
MP_OBJ_VFS_LFSx_FILE *o = mp_obj_malloc_var_with_finaliser(MP_OBJ_VFS_LFSx_FILE, file_buffer, uint8_t, self->lfs.cfg->prog_size, type);
|
||||
#else
|
||||
MP_OBJ_VFS_LFSx_FILE *o = mp_obj_malloc_var_with_finaliser(MP_OBJ_VFS_LFSx_FILE, uint8_t, self->lfs.cfg->cache_size, type);
|
||||
MP_OBJ_VFS_LFSx_FILE *o = mp_obj_malloc_var_with_finaliser(MP_OBJ_VFS_LFSx_FILE, file_buffer, uint8_t, self->lfs.cfg->cache_size, type);
|
||||
#endif
|
||||
o->vfs = self;
|
||||
#if !MICROPY_GC_CONSERVATIVE_CLEAR
|
||||
|
||||
Reference in New Issue
Block a user