Gregory P. Smith <[EMAIL PROTECTED]> added the comment: i only had a brief look when i was going through code looking for potentially incorrect uses of PyByteArray_*.
I've got a patch that i believe cleans it up a little but its sitting on a machine i don't have remote access to at the moment. i'll attach it when i get a chance. Looking at Lib/ssl.py it appears that recv_into needs this functionality. I'd still suggest changing the order to be "|iO" to simplify the code a little. The PyLong_Check(buf) could go away. I do not see any calls to _sslobj.read() within Lib.ssl.py that only pass in a buffer without passing in a length. When no bytearray is passed in, the code internally uses a temporary bytearray object which is later freed after being copied into a bytes object. I think it would be better to just use PyBytes_FromStringAndSize(0, len) and replace the "if (!buf_passed)" conversion data copy with a _PyBytes_Resize? The latter will only realloc and copy if needed. regardless, thanks for lowering the priority. looking over the code again I believe whats there is functionally correct even if a bit odd looking. _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3805> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com