Skip to content

Commit e178204

Browse files
committed
teensy/lexerfrozen: Make mp_lexer_new_from_file raise an exception.
1 parent 9714200 commit e178204

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

teensy/lexerfrozen.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
#include <stdio.h>
22

33
#include "py/lexer.h"
4+
#include "py/runtime.h"
5+
#include "py/mperrno.h"
46

57
mp_import_stat_t mp_import_stat(const char *path) {
68
return MP_IMPORT_STAT_NO_EXIST;
79
}
810

911
mp_lexer_t *mp_lexer_new_from_file(const char *filename) {
10-
return NULL;
12+
mp_raise_OSError(MP_ENOENT);
1113
}

0 commit comments

Comments
 (0)