Skip to content
Snippets Groups Projects
  • Sean Burton's avatar
    e33bc597
    py: Remove calls to file reader functions when these are disabled. · e33bc597
    Sean Burton authored
    If MICROPY_PERSISTENT_CODE_LOAD or MICROPY_ENABLE_COMPILER are enabled then
    code gets enabled that calls file reading functions which may be disabled
    if no readers have been implemented.
    
    To fix this, introduce a MICROPY_HAS_FILE_READER variable, which is
    automatically set if MICROPY_READER_POSIX or MICROPY_READER_VFS is set but
    can also be manually set if a custom reader is being implemented.  Then
    disable the file reading calls if this is not set.
    e33bc597
    History
    py: Remove calls to file reader functions when these are disabled.
    Sean Burton authored
    If MICROPY_PERSISTENT_CODE_LOAD or MICROPY_ENABLE_COMPILER are enabled then
    code gets enabled that calls file reading functions which may be disabled
    if no readers have been implemented.
    
    To fix this, introduce a MICROPY_HAS_FILE_READER variable, which is
    automatically set if MICROPY_READER_POSIX or MICROPY_READER_VFS is set but
    can also be manually set if a custom reader is being implemented.  Then
    disable the file reading calls if this is not set.