[SOLVED]lexerfrozen.c - what's the point of this?
Posted: Thu Oct 19, 2017 2:45 am
In the teensy port, there is the following in the makefile
I understand why that's there.
What I do not understand is the content of lexerfrozen.c
That is the entire file.
Code: Select all
ifeq ($(USE_FROZEN),1)
ifeq ($(FROZEN_DIR),)
FROZEN_DIR = memzip_files
endif
CFLAGS += -DMICROPY_MODULE_FROZEN_STR
SRC_C += \
lexerfrozen.c \
$(BUILD)/frozen.c
endif # USE_FROZEN
What I do not understand is the content of lexerfrozen.c
Code: Select all
#include <stdio.h>
#include "py/lexer.h"
#include "py/runtime.h"
#include "py/mperrno.h"
mp_import_stat_t mp_import_stat(const char *path) {
return MP_IMPORT_STAT_NO_EXIST;
}
mp_lexer_t *mp_lexer_new_from_file(const char *filename) {
mp_raise_OSError(MP_ENOENT);
}