Author serhiy.storchaka
Recipients barry, ezio.melotti, kushal.das, ncoghlan, pitrou, serhiy.storchaka, vstinner
Date 2013-05-24.07:01:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1369378919.79.0.0373937710917.issue17839@psf.upfronthosting.co.za>
In-reply-to
Content
It works only if input also supports slicing and this slicing is corresponded to bytes-slicing. It perhaps doesn't catch a non C-continuous buffers.

Actually we need something like (unlikely cast() doesn't work with empty buffers):

    s = memoryview(s)
    if not s:
        return b''
    s = s.cast('B')
    ...
History
Date User Action Args
2013-05-24 07:01:59serhiy.storchakasetrecipients: + serhiy.storchaka, barry, ncoghlan, pitrou, vstinner, ezio.melotti, kushal.das
2013-05-24 07:01:59serhiy.storchakasetmessageid: <1369378919.79.0.0373937710917.issue17839@psf.upfronthosting.co.za>
2013-05-24 07:01:59serhiy.storchakalinkissue17839 messages
2013-05-24 07:01:59serhiy.storchakacreate