[Python-3000] PyBUF_LOCK fails on bytes objects. they're read-only, why should it fail?

2008-03-14 Thread Gregory P. Smith
bytes objects are by their definition immutable and read only. but when passing one to a buffer api that tries to use the PyBUF_LOCK flag it raises BufferError "Cannot lock this object." from PyBuffer_FillInfo in Objects/abstract.c as called by Objects/bytesobject.c's bytes_getbuffer method. I th

Re: [Python-3000] PyBUF_LOCK fails on bytes objects. they're read-only, why should it fail?

2008-03-14 Thread Travis Oliphant
Gregory P. Smith wrote: > bytes objects are by their definition immutable and read only. but when > passing one to a buffer api that tries to use the PyBUF_LOCK flag it > raises BufferError "Cannot lock this object." from PyBuffer_FillInfo in > Objects/abstract.c as called by Objects/bytesobjec