Lines Matching refs:end
109 raise_errmsg(const char *msg, PyObject *s, Py_ssize_t end);
318 raise_errmsg(const char *msg, PyObject *s, Py_ssize_t end)
335 exc = PyObject_CallFunction(JSONDecodeError, "zOn", msg, s, end);
381 scanstring_unicode(PyObject *pystr, Py_ssize_t end, int strict, Py_ssize_t *next_end_ptr)
384 end is the index of the first character after the quote.
387 after the end quote
393 Py_ssize_t begin = end - 1;
409 if (end < 0 || len < end) {
410 PyErr_SetString(PyExc_ValueError, "end is out of bounds");
414 /* Find the end of the string or the next escape */
419 for (next = end; next < len; next++) {
435 PyObject *ret = PyUnicode_Substring(pystr, end, next);
449 if (next != end) {
450 if (_PyUnicodeWriter_WriteSubstring(&writer, pystr, end, next) < 0) {
456 end = next;
466 end = next + 1;
479 raise_errmsg("Invalid \\escape", pystr, end - 2);
486 end = next + 4;
487 if (end >= len) {
492 for (; next < end; next++) {
506 raise_errmsg("Invalid \\uXXXX escape", pystr, end - 5);
511 if (Py_UNICODE_IS_HIGH_SURROGATE(c) && end + 6 < len &&
515 end += 6;
517 for (; next < end; next++) {
531 raise_errmsg("Invalid \\uXXXX escape", pystr, end - 5);
538 end -= 6;
547 *next_end_ptr = end;
557 "scanstring(string, end, strict=True) -> (string, end)\n"
566 "after the end quote."
574 Py_ssize_t end;
577 if (!PyArg_ParseTuple(args, "On|i:scanstring", &pystr, &end, &strict)) {
581 rval = scanstring_unicode(pystr, end, strict, &next_end);
936 /* read a sign if it's there, make sure it's not the end of the string */