Brett Cannon wrote:
> See http://bugs.python.org/issue1247 for Christian's patch.  Maybe you
> can do a code review of Christian's work, Alexandre?  And if you want
> to be really brave you could maybe even do the commit yourself.  =)

I'm not happy with:

    static const char *quote_prefix = "buffer(b'";
    p = PyUnicode_AS_UNICODE(v);
    for (i=0; i<strlen(quote_prefix); i++) {
        *p++ = quote_prefix[i];
    }

but I didn't know how to code it more elegant. It follows the previous
version of the code and it's the fastest way I can think of without
messing around with unicode. strncpy/memcpy doesn't work for obvious
reasons. :/

Christian
_______________________________________________
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

Reply via email to