John Leitch added the comment:

We based our fix on the check in write_bytes:

    if (endpos > (size_t)PyBytes_GET_SIZE(self->buf)) {
        if (resize_buffer(self, endpos) < 0)
            return -1;
    }

I see now that our casting was extraneous. As for the macro, it was suspected 
that similar issues may be present and we wanted to write reusable code, but 
this also seems unnecessary now that it's known the cast is unneeded.

Early tomorrow I'll take some time to create a revised patch.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24989>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to