Skip to content

Commit 16c44a4

Browse files
authored
Merge pull request #6047 from jepler/fix-qstr-error
Fix qstr error
2 parents ab037bd + 1309ef0 commit 16c44a4

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

py/genlast.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def preprocess(command, output_dir, fn):
4848
process_file(fn, output_dir, output)
4949
except Exception as e:
5050
print(e, file=sys.stderr)
51+
raise
5152

5253

5354
def maybe_preprocess(command, output_dir, fn):
@@ -72,6 +73,18 @@ def maybe_preprocess(command, output_dir, fn):
7273
# Mac and Windows use 'spawn'. Uncomment this during testing to catch spawn-specific problems on Linux.
7374
# multiprocessing.set_start_method("spawn")
7475
executor = ProcessPoolExecutor(max_workers=multiprocessing.cpu_count() + 1)
75-
executor.map(maybe_preprocess, itertools.repeat(command), itertools.repeat(output_dir), check)
76-
executor.map(preprocess, itertools.repeat(command), itertools.repeat(output_dir), always)
76+
results = []
77+
try:
78+
results.extend(
79+
executor.map(
80+
maybe_preprocess, itertools.repeat(command), itertools.repeat(output_dir), check
81+
)
82+
)
83+
results.extend(
84+
executor.map(
85+
preprocess, itertools.repeat(command), itertools.repeat(output_dir), always
86+
)
87+
)
88+
except subprocess.CalledProcessError:
89+
raise SystemExit(1)
7790
executor.shutdown()

supervisor/shared/translate.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,13 @@ STATIC int put_utf8(char *buf, int u) {
8787
}
8888

8989
uint16_t decompress_length(const compressed_string_t *compressed) {
90+
#ifndef NO_QSTR
9091
#if (compress_max_length_bits <= 8)
9192
return 1 + (compressed->data >> (8 - compress_max_length_bits));
9293
#else
9394
return 1 + ((compressed->data * 256 + compressed->tail[0]) >> (16 - compress_max_length_bits));
9495
#endif
96+
#endif
9597
}
9698

9799
char *decompress(const compressed_string_t *compressed, char *decompressed) {

0 commit comments

Comments
 (0)