diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-02-20 13:25:05 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-02-20 13:25:05 +0200 |
commit | a8d31b28bcf640579c013eeeb2e814c317e59111 (patch) | |
tree | 6080213056ea7fa211a0af6153b4245309840e38 /py/builtinimport.c | |
parent | a1aba36febc8ff1107114da2ffdac398206ebb7e (diff) | |
download | micropython-a8d31b28bcf640579c013eeeb2e814c317e59111.tar.gz micropython-a8d31b28bcf640579c013eeeb2e814c317e59111.zip |
emitbc: Correct buffer sizes for varlen int encoding.
Assuming we have truncating (floor) division, way to do ceiling division
by N is to use formula (x + (N-1)) / N. Specifically, 63 bits, if stored
7 bits per byte, require exactly 9 bytes. 64 bits overflow that and require
10 bytes.
Diffstat (limited to 'py/builtinimport.c')
0 files changed, 0 insertions, 0 deletions