>> I don't think that's possible. The regex engine can also operate on >> objects whose representation may move in memory when you don't hold >> the GIL (e.g. buffers that get mutated). > > Why is it a problem? If we get a buffer through the new buffer API, the object > should ensure that the representation isn't moved away until the buffer is > released.
In 2.7, we currently get the buffer with bf_getreadbuffer. In 3.x, we have /* Release the buffer immediately --- possibly dangerous but doing something else would require some re-factoring */ PyBuffer_Release(&view); Even if we do use the new API, and correctly, it still might be confusing if the contents of the buffer changes underneath. Regards, Martin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com