Index: unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.175 diff -c -r2.175 unicodeobject.c *** unicodeobject.c 18 Nov 2002 16:10:18 -0000 2.175 --- unicodeobject.c 12 Dec 2002 19:46:39 -0000 *************** *** 5931,5936 **** --- 5931,5949 ---- return PyString_GET_SIZE(str); } + static size_t + unicode_getlockedreadbuffer(PyUnicodeObject *self, const void **ptr) + { + *ptr = (void *)self->str; + return PyUnicode_GET_DATA_SIZE(self); + } + + static void + unicode_releaselockedbuffer(PyUnicodeObject *self) + { + return; + } + /* Helpers for PyUnicode_Format() */ static PyObject * *************** *** 6592,6597 **** --- 6605,6614 ---- (getwritebufferproc) unicode_buffer_getwritebuf, (getsegcountproc) unicode_buffer_getsegcount, (getcharbufferproc) unicode_buffer_getcharbuf, + (acquirelockedreadbufferproc) unicode_getlockedreadbuffer, + (acquirelockedwritebufferproc) 0, + (releaselockedbufferproc) unicode_releaselockedbuffer, + }; static PyObject *