Lines Matching defs:result
189 buffer where the result characters are written to. */
645 /* don't make the result ready in debug mode to ensure that the caller
740 "encoded result is too long for a Python string");
815 "encoded result is too long for a Python string");
2606 void *result;
2611 result = PyMem_New(Py_UCS2, len);
2612 if (!result)
2619 result);
2620 return result;
2622 result = PyMem_New(Py_UCS4, len);
2623 if (!result)
2630 result);
2638 result);
2640 return result;
4494 "decoded result is too long for a Python string");
4870 PyObject *result = PyUnicode_FromKindAndData(
4875 return result;
5531 maximum possible needed (4 result bytes per Unicode character), and return
6551 PyObject *result = _PyUnicode_DecodeUnicodeEscapeInternal(s, size, errors,
6554 if (result == NULL)
6563 Py_DECREF(result);
6572 Py_DECREF(result);
6577 return result;
6987 put the result into newpos and return the replacement string, which
7179 /* Directly copy bytes result to output. */
7442 /* First get the size of the result */
7769 /* First get the size of the result */
7998 "unable to encode error handler result to ASCII");
8405 PyObject *result;
8456 PyObject *result = PyDict_New();
8458 if (!result)
8465 if (PyDict_SetItem(result, key, value) == -1)
8470 return result;
8474 Py_DECREF(result);
8479 result = PyObject_Malloc(sizeof(struct encoding_map) +
8481 if (!result) {
8485 _PyObject_Init(result, &EncodingMapType);
8486 mresult = (struct encoding_map*)result;
8511 return result;
8605 /* lookup the character, put the result in the output string and adjust
8610 reallocation error occurred. The caller must decref the result */
8770 /* Directly copy bytes result to output. */
8923 put the result into newpos and return the replacement string, which
8977 /* Lookup the character ch in the mapping and put the result in result,
8981 charmaptranslate_lookup(Py_UCS4 c, PyObject *mapping, PyObject **result)
8994 *result = NULL;
9000 *result = x;
9012 *result = x;
9016 *result = x;
9028 /* lookup the character, write the result into the writer.
9029 Return 1 if the result was written into the writer, return 0 if the mapping
9336 PyObject *result = PyUnicode_New(len, 127);
9337 if (result == NULL) {
9341 Py_UCS1 *out = PyUnicode_1BYTE_DATA(result);
9358 _PyUnicode_LENGTH(result) = i + 1;
9365 assert(_PyUnicode_CheckConsistency(result, 1));
9366 return result;
9394 Py_ssize_t len1, len2, result;
9411 result = findchar((const char *)buf1 + kind1*start,
9413 if (result == -1)
9416 return start + result;
9429 result = asciilib_find_slice(buf1, len1, buf2, len2, start, end);
9431 result = ucs1lib_find_slice(buf1, len1, buf2, len2, start, end);
9434 result = ucs2lib_find_slice(buf1, len1, buf2, len2, start, end);
9437 result = ucs4lib_find_slice(buf1, len1, buf2, len2, start, end);
9447 result = asciilib_rfind_slice(buf1, len1, buf2, len2, start, end);
9449 result = ucs1lib_rfind_slice(buf1, len1, buf2, len2, start, end);
9452 result = ucs2lib_rfind_slice(buf1, len1, buf2, len2, start, end);
9455 result = ucs4lib_rfind_slice(buf1, len1, buf2, len2, start, end);
9466 return result;
9621 Py_ssize_t result;
9651 result = asciilib_count(
9656 result = ucs1lib_count(
9662 result = ucs2lib_count(
9668 result = ucs4lib_count(
9681 return result;
9708 Py_ssize_t len, result;
9716 result = findchar(PyUnicode_1BYTE_DATA(str) + kind*start,
9718 if (result == -1)
9721 return start + result;
10065 PyObject *res = NULL; /* the result */
10154 "join() result is too long for a Python string");
10640 result string. */
11034 /* normalize result of memcmp() into the range [-1; 1] */
11084 /* normalize result of wmemcmp() into the range [-1; 1] */
11319 int result;
11345 result = unicode_compare_eq(left, right);
11346 result ^= (op == Py_NE);
11347 return PyBool_FromLong(result);
11350 result = unicode_compare(left, right);
11351 Py_RETURN_RICHCOMPARE(result, 0, op);
11367 int result;
11392 result = findchar((const char *)buf1, kind1, len1, ch, 1) != -1;
11393 return result;
11403 result = ucs1lib_find(buf1, len1, buf2, len2, 0) != -1;
11406 result = ucs2lib_find(buf1, len1, buf2, len2, 0) != -1;
11409 result = ucs4lib_find(buf1, len1, buf2, len2, 0) != -1;
11419 return result;
11427 PyObject *result;
11466 result = PyUnicode_New(new_len, maxchar);
11467 if (result == NULL)
11469 _PyUnicode_FastCopyCharacters(result, 0, left, 0, left_len);
11470 _PyUnicode_FastCopyCharacters(result, left_len, right, 0, right_len);
11471 assert(_PyUnicode_CheckConsistency(result, 1));
11472 return result;
11597 PyObject *result;
11646 result = PyLong_FromSsize_t(iresult);
11652 return result;
11782 Py_ssize_t result;
11790 result = any_find_slice(self, substring, start, end, 1);
11792 if (result == -2)
11795 return PyLong_FromSsize_t(result);
11856 Py_ssize_t result;
11867 result = any_find_slice(self, substring, start, end, 1);
11869 if (result == -2)
11872 if (result < 0) {
11877 return PyLong_FromSsize_t(result);
12437 The result is returned as a new string.
13068 Py_ssize_t result;
13076 result = any_find_slice(self, substring, start, end, -1);
13078 if (result == -2)
13081 return PyLong_FromSsize_t(result);
13100 Py_ssize_t result;
13108 result = any_find_slice(self, substring, start, end, -1);
13110 if (result == -2)
13113 if (result < 0) {
13118 return PyLong_FromSsize_t(result);
13163 empty strings from the result.
13429 must be a string, whose characters will be mapped to None in the result.
13641 int result;
13656 result = tailmatch(self, substring, start, end, -1);
13657 if (result == -1)
13659 if (result) {
13672 result = tailmatch(self, subobj, start, end, -1);
13673 if (result == -1)
13675 return PyBool_FromLong(result);
13695 int result;
13710 result = tailmatch(self, substring, start, end, +1);
13711 if (result == -1)
13713 if (result) {
13725 result = tailmatch(self, subobj, start, end, +1);
13726 if (result == -1)
13728 return PyBool_FromLong(result);
14256 PyObject *result;
14294 result = PyUnicode_New(slicelength, max_char);
14295 if (result == NULL)
14297 dest_kind = PyUnicode_KIND(result);
14298 dest_data = PyUnicode_DATA(result);
14304 assert(_PyUnicode_CheckConsistency(result, 1));
14305 return result;
14425 PyObject *result = NULL;
14451 result = PyNumber_ToBase(val, 10);
14455 result = PyNumber_ToBase(val, 8);
14460 result = PyNumber_ToBase(val, 16);
14463 if (!result)
14466 assert(unicode_modifiable(result));
14467 assert(PyUnicode_IS_READY(result));
14468 assert(PyUnicode_IS_ASCII(result));
14471 if (Py_REFCNT(result) != 1) {
14472 Py_DECREF(result);
14476 buf = PyUnicode_DATA(result);
14477 llen = PyUnicode_GET_LENGTH(result);
14479 Py_DECREF(result);
14511 Py_DECREF(result);
14522 Py_DECREF(result);
14523 result = r1;
14524 buf = PyBytes_AS_STRING(result);
14536 if (!PyUnicode_Check(result)
14537 || buf != PyUnicode_DATA(result)) {
14540 Py_DECREF(result);
14541 result = unicode;
14543 else if (len != PyUnicode_GET_LENGTH(result)) {
14544 if (PyUnicode_Resize(&result, len) < 0)
14545 Py_CLEAR(result);
14547 return result;
15408 Otherwise, returns the result of object.__str__() (if defined)\n\