On 10/8/07, Bill Janssen <[EMAIL PROTECTED]> wrote: > I think I can spend some time on the 3K SSL support, but I've been > waiting till the "bytes" work settles down. Sounds like I should > keep waiting a bit more? Or have the C APIs already settled?
The C APIs haven't quite settled down yet, but I'd like to convince you that you needn't wait. For all bytes input, you should use the (new) buffer API,i. e. PyObject_GetBuffer() and PyObject_ReleaseBuffer() (grep for usage examples if they aren't sufficiently documented in the docs or in PEP 3118). For stuff that returns bytes, you can either use PyBytes_FromStringAndSize() -- which is the 3.0a1 recommended best practice (returning a mutable bytes object) or PyString_FromStringAndSize() -- which will be the 3.0a2 way of returning an immutable bytes object). Since they have the same signature there's very little to worry about having to change this around later. -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
