Skip to content

Commit e1311be

Browse files
committed
Fix WriteBuffer writes in C lib
1 parent 4fb6b1f commit e1311be

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

mypyc/lib-rt/librt_internal.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,6 @@ _write_short_int(PyObject *data, Py_ssize_t real_value) {
461461
if (real_value >= MIN_ONE_BYTE_INT && real_value <= MAX_ONE_BYTE_INT) {
462462
_CHECK_WRITE(data, 1)
463463
_WRITE(data, uint8_t, (uint8_t)(real_value - MIN_ONE_BYTE_INT) << 1);
464-
((WriteBufferObject *)data)->ptr += 1;
465464
} else if (real_value >= MIN_TWO_BYTES_INT && real_value <= MAX_TWO_BYTES_INT) {
466465
_CHECK_WRITE(data, 2)
467466
#if PY_BIG_ENDIAN
@@ -470,7 +469,6 @@ _write_short_int(PyObject *data, Py_ssize_t real_value) {
470469
#else
471470
_WRITE(data, uint16_t, ((uint16_t)(real_value - MIN_TWO_BYTES_INT) << 2) | TWO_BYTES_INT_BIT);
472471
#endif
473-
((WriteBufferObject *)data)->ptr += 2;
474472
} else {
475473
_CHECK_WRITE(data, 4)
476474
#if PY_BIG_ENDIAN
@@ -479,7 +477,6 @@ _write_short_int(PyObject *data, Py_ssize_t real_value) {
479477
#else
480478
_WRITE(data, uint32_t, ((uint32_t)(real_value - MIN_FOUR_BYTES_INT) << 3) | FOUR_BYTES_INT_TRAILER);
481479
#endif
482-
((WriteBufferObject *)data)->ptr += 4;
483480
}
484481
return CPY_NONE;
485482
}
@@ -766,7 +763,6 @@ static inline char
766763
_write_long_int(PyObject *data, CPyTagged value) {
767764
_CHECK_WRITE(data, 1)
768765
_WRITE(data, uint8_t, LONG_INT_TRAILER);
769-
((WriteBufferObject *)data)->end += 1;
770766

771767
PyObject *hex_str = NULL;
772768
PyObject* int_value = CPyTagged_AsObject(value);

0 commit comments

Comments
 (0)