Show More
@@ -55,7 +55,7 b' enum dir_state {' | |||
|
55 | 55 | DDEFAULT, |
|
56 | 56 | }; |
|
57 | 57 | |
|
58 |
static inline int i |
|
|
58 | static inline int inset(const uint32_t bitset[], char c) | |
|
59 | 59 | { |
|
60 | 60 | return bitset[((uint8_t)c) >> 5] & (1 << (((uint8_t)c) & 31)); |
|
61 | 61 | } |
@@ -419,7 +419,7 b' static Py_ssize_t _encode(const uint32_t' | |||
|
419 | 419 | } |
|
420 | 420 | break; |
|
421 | 421 | case DEFAULT: |
|
422 |
while (i |
|
|
422 | while (inset(onebyte, src[i])) { | |
|
423 | 423 | charcopy(dest, &destlen, destsize, src[i++]); |
|
424 | 424 | if (i == len) |
|
425 | 425 | goto done; |
@@ -439,14 +439,14 b' static Py_ssize_t _encode(const uint32_t' | |||
|
439 | 439 | i++; |
|
440 | 440 | break; |
|
441 | 441 | default: |
|
442 |
if (i |
|
|
442 | if (inset(onebyte, src[i])) { | |
|
443 | 443 | do { |
|
444 | 444 | charcopy(dest, &destlen, |
|
445 | 445 | destsize, src[i++]); |
|
446 | 446 | } while (i < len && |
|
447 |
i |
|
|
447 | inset(onebyte, src[i])); | |
|
448 | 448 | } |
|
449 |
else if (i |
|
|
449 | else if (inset(twobytes, src[i])) { | |
|
450 | 450 | char c = src[i++]; |
|
451 | 451 | charcopy(dest, &destlen, destsize, '_'); |
|
452 | 452 | charcopy(dest, &destlen, destsize, |
General Comments 0
You need to be logged in to leave comments.
Login now