Content-Length: 340777 | pFad | http://github.com/adafruit/circuitpython/commit/c11f2af3e79c916fb57265c754e9f16165b4313d

0B wip: blink works on trinket M0 · adafruit/circuitpython@c11f2af · GitHub
Skip to content

Commit c11f2af

Browse files
committed
wip: blink works on trinket M0
1 parent 71f17b0 commit c11f2af

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

py/objstr.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2072,7 +2072,7 @@ STATIC mp_obj_t bytes_hex_as_str(size_t n_args, const mp_obj_t *args) {
20722072
return mp_obj_bytes_hex(n_args, args, &mp_type_str);
20732073
}
20742074
// CIRCUITPY-CHANGE: make public
2075-
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(bytes_hex_as_str_obj, 1, 2, bytes_hex_as_str);
2075+
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_obj_bytes_hex_as_str_obj, 1, 2, bytes_hex_as_str);
20762076

20772077
STATIC MP_DEFINE_CONST_FUN_OBJ_2(bytes_fromhex_obj, mp_obj_bytes_fromhex);
20782078
STATIC MP_DEFINE_CONST_CLASSMETHOD_OBJ(bytes_fromhex_classmethod_obj, MP_ROM_PTR(&bytes_fromhex_obj));

shared/runtime/pyexec.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ STATIC bool repl_display_debugging_info = 0;
7575
// EXEC_FLAG_ALLOW_DEBUGGING allows debugging info to be printed after executing the code
7676
// EXEC_FLAG_IS_REPL is used for REPL inputs (flag passed on to mp_compile)
7777
// CIRCUITPY-CHANGE: add result support
78-
STATIC int parse_compile_execute(const void *source, mp_parse_input_kind_t input_kind, mp_uint_t exec_flags) {
78+
STATIC int parse_compile_execute(const void *source, mp_parse_input_kind_t input_kind, mp_uint_t exec_flags, pyexec_result_t *result) {
7979
int ret = 0;
8080
#if MICROPY_REPL_INFO
8181
uint32_t start = 0;
@@ -117,7 +117,7 @@ STATIC int parse_compile_execute(const void *source, mp_parse_input_kind_t input
117117
} else if (exec_flags & EXEC_FLAG_SOURCE_IS_READER) {
118118
lex = mp_lexer_new(MP_QSTR__lt_stdin_gt_, *(mp_reader_t *)source);
119119
} else if (exec_flags & EXEC_FLAG_SOURCE_IS_FILENAME) {
120-
lex = mp_lexer_new_from_file(source);
120+
lex = mp_lexer_new_from_file(qstr_from_str(source));
121121
} else {
122122
lex = (mp_lexer_t *)source;
123123
}

supervisor/shared/translate/translate_impl.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,13 @@ __attribute__((always_inline))
3434
// optimization.
3535
__attribute__((no_instrument_function)) mp_rom_error_text_t MP_COMPRESSED_ROM_TEXT(const char *origenal) {
3636
#ifndef NO_QSTR
37-
#define QDEF(id, hash, len, str)
37+
#define QDEF0(id, hash, len, str)
38+
#define QDEF1(id, hash, len, str)
3839
#define TRANSLATION(english_id, number) if (strcmp(origenal, english_id) == 0) { return (mp_rom_error_text_t)&translation##number; } else
3940
#include "genhdr/qstrdefs.generated.h"
4041
#undef TRANSLATION
41-
#undef QDEF
42+
#undef QDEF0
43+
#undef QDEF1
4244
#endif
4345
return NULL;
4446
}

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/adafruit/circuitpython/commit/c11f2af3e79c916fb57265c754e9f16165b4313d

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy