Searched refs:result_buf (Results 1 – 8 of 8) sorted by relevance
529 char *result_buf = (char *)PyMem_Malloc(slicelength); in buffer_subscript() local531 if (result_buf == NULL) in buffer_subscript()536 result_buf[i] = source_buf[cur]; in buffer_subscript()539 result = PyString_FromStringAndSize(result_buf, in buffer_subscript()541 PyMem_Free(result_buf); in buffer_subscript()
453 char *result_buf = (char *)PyMem_Malloc(slicelength); in bytearray_subscript() local456 if (result_buf == NULL) in bytearray_subscript()461 result_buf[i] = source_buf[cur]; in bytearray_subscript()463 result = PyByteArray_FromStringAndSize(result_buf, slicelength); in bytearray_subscript()464 PyMem_Free(result_buf); in bytearray_subscript()
1310 char* result_buf; in string_subscript() local1335 result_buf = (char *)PyMem_Malloc(slicelength); in string_subscript()1336 if (result_buf == NULL) in string_subscript()1341 result_buf[i] = source_buf[cur]; in string_subscript()1344 result = PyString_FromStringAndSize(result_buf, in string_subscript()1346 PyMem_Free(result_buf); in string_subscript()
8000 Py_UNICODE* result_buf; in unicode_subscript() local8018 result_buf = (Py_UNICODE *)PyObject_MALLOC(slicelength* in unicode_subscript()8021 if (result_buf == NULL) in unicode_subscript()8025 result_buf[i] = source_buf[cur]; in unicode_subscript()8028 result = PyUnicode_FromUnicode(result_buf, slicelength); in unicode_subscript()8029 PyObject_FREE(result_buf); in unicode_subscript()
519 char *result_buf = (char *)PyMem_Malloc(slicelength); in buffer_subscript() local521 if (result_buf == NULL) in buffer_subscript()526 result_buf[i] = source_buf[cur]; in buffer_subscript()529 result = PyString_FromStringAndSize(result_buf, in buffer_subscript()531 PyMem_Free(result_buf); in buffer_subscript()
1293 char* result_buf; in string_subscript() local1318 result_buf = (char *)PyMem_Malloc(slicelength); in string_subscript()1319 if (result_buf == NULL) in string_subscript()1324 result_buf[i] = source_buf[cur]; in string_subscript()1327 result = PyString_FromStringAndSize(result_buf, in string_subscript()1329 PyMem_Free(result_buf); in string_subscript()
7896 Py_UNICODE* result_buf; in unicode_subscript() local7914 result_buf = (Py_UNICODE *)PyObject_MALLOC(slicelength* in unicode_subscript()7917 if (result_buf == NULL) in unicode_subscript()7921 result_buf[i] = source_buf[cur]; in unicode_subscript()7924 result = PyUnicode_FromUnicode(result_buf, slicelength); in unicode_subscript()7925 PyObject_FREE(result_buf); in unicode_subscript()