• Home
  • Raw
  • Download

Lines Matching refs:pystr

89 ascii_escape_unicode(PyObject *pystr);
91 py_encode_basestring_ascii(PyObject* self UNUSED, PyObject *pystr);
94 scan_once_unicode(PyScannerObject *s, PyObject *pystr, Py_ssize_t idx, Py_ssize_t *next_idx_ptr);
164 ascii_escape_unicode(PyObject *pystr) in ascii_escape_unicode() argument
176 if (PyUnicode_READY(pystr) == -1) in ascii_escape_unicode()
179 input_chars = PyUnicode_GET_LENGTH(pystr); in ascii_escape_unicode()
180 input = PyUnicode_DATA(pystr); in ascii_escape_unicode()
181 kind = PyUnicode_KIND(pystr); in ascii_escape_unicode()
230 escape_unicode(PyObject *pystr) in escape_unicode() argument
242 if (PyUnicode_READY(pystr) == -1) in escape_unicode()
245 maxchar = PyUnicode_MAX_CHAR_VALUE(pystr); in escape_unicode()
246 input_chars = PyUnicode_GET_LENGTH(pystr); in escape_unicode()
247 input = PyUnicode_DATA(pystr); in escape_unicode()
248 kind = PyUnicode_KIND(pystr); in escape_unicode()
401 scanstring_unicode(PyObject *pystr, Py_ssize_t end, int strict, Py_ssize_t *next_end_ptr) in scanstring_unicode() argument
420 if (PyUnicode_READY(pystr) == -1) in scanstring_unicode()
423 len = PyUnicode_GET_LENGTH(pystr); in scanstring_unicode()
424 buf = PyUnicode_DATA(pystr); in scanstring_unicode()
425 kind = PyUnicode_KIND(pystr); in scanstring_unicode()
440 raise_errmsg("Invalid control character at", pystr, next); in scanstring_unicode()
445 raise_errmsg("Unterminated string starting at", pystr, begin); in scanstring_unicode()
465 raise_errmsg("Unterminated string starting at", pystr, begin); in scanstring_unicode()
484 raise_errmsg("Invalid \\escape", pystr, end - 2); in scanstring_unicode()
493 raise_errmsg("Invalid \\uXXXX escape", pystr, next - 1); in scanstring_unicode()
511 raise_errmsg("Invalid \\uXXXX escape", pystr, end - 5); in scanstring_unicode()
536 raise_errmsg("Invalid \\uXXXX escape", pystr, end - 5); in scanstring_unicode()
593 PyObject *pystr; in py_scanstring() local
598 if (!PyArg_ParseTuple(args, "On|i:scanstring", &pystr, &end, &strict)) { in py_scanstring()
601 if (PyUnicode_Check(pystr)) { in py_scanstring()
602 rval = scanstring_unicode(pystr, end, strict, &next_end); in py_scanstring()
607 Py_TYPE(pystr)->tp_name); in py_scanstring()
620 py_encode_basestring_ascii(PyObject* self UNUSED, PyObject *pystr) in py_encode_basestring_ascii() argument
625 if (PyUnicode_Check(pystr)) { in py_encode_basestring_ascii()
626 rval = ascii_escape_unicode(pystr); in py_encode_basestring_ascii()
631 Py_TYPE(pystr)->tp_name); in py_encode_basestring_ascii()
645 py_encode_basestring(PyObject* self UNUSED, PyObject *pystr) in py_encode_basestring() argument
650 if (PyUnicode_Check(pystr)) { in py_encode_basestring()
651 rval = escape_unicode(pystr); in py_encode_basestring()
656 Py_TYPE(pystr)->tp_name); in py_encode_basestring()
701 _parse_object_unicode(PyScannerObject *s, PyObject *pystr, Py_ssize_t idx, Py_ssize_t *next_idx_ptr) in _parse_object_unicode() argument
719 if (PyUnicode_READY(pystr) == -1) in _parse_object_unicode()
722 str = PyUnicode_DATA(pystr); in _parse_object_unicode()
723 kind = PyUnicode_KIND(pystr); in _parse_object_unicode()
724 end_idx = PyUnicode_GET_LENGTH(pystr) - 1; in _parse_object_unicode()
743 raise_errmsg("Expecting property name enclosed in double quotes", pystr, idx); in _parse_object_unicode()
746 key = scanstring_unicode(pystr, idx + 1, s->strict, &next_idx); in _parse_object_unicode()
764 raise_errmsg("Expecting ':' delimiter", pystr, idx); in _parse_object_unicode()
771 val = scan_once_unicode(s, pystr, idx, &next_idx); in _parse_object_unicode()
802 raise_errmsg("Expecting ',' delimiter", pystr, idx); in _parse_object_unicode()
835 _parse_array_unicode(PyScannerObject *s, PyObject *pystr, Py_ssize_t idx, Py_ssize_t *next_idx_ptr)… in _parse_array_unicode() argument
850 if (PyUnicode_READY(pystr) == -1) in _parse_array_unicode()
857 str = PyUnicode_DATA(pystr); in _parse_array_unicode()
858 kind = PyUnicode_KIND(pystr); in _parse_array_unicode()
859 end_idx = PyUnicode_GET_LENGTH(pystr) - 1; in _parse_array_unicode()
869 val = scan_once_unicode(s, pystr, idx, &next_idx); in _parse_array_unicode()
886 raise_errmsg("Expecting ',' delimiter", pystr, idx); in _parse_array_unicode()
898 raise_errmsg("Expecting value", pystr, end_idx); in _parse_array_unicode()
936 _match_number_unicode(PyScannerObject *s, PyObject *pystr, Py_ssize_t start, Py_ssize_t *next_idx_p… in _match_number_unicode() argument
955 if (PyUnicode_READY(pystr) == -1) in _match_number_unicode()
958 str = PyUnicode_DATA(pystr); in _match_number_unicode()
959 kind = PyUnicode_KIND(pystr); in _match_number_unicode()
960 end_idx = PyUnicode_GET_LENGTH(pystr) - 1; in _match_number_unicode()
1053 scan_once_unicode(PyScannerObject *s, PyObject *pystr, Py_ssize_t idx, Py_ssize_t *next_idx_ptr) in scan_once_unicode() argument
1067 if (PyUnicode_READY(pystr) == -1) in scan_once_unicode()
1070 str = PyUnicode_DATA(pystr); in scan_once_unicode()
1071 kind = PyUnicode_KIND(pystr); in scan_once_unicode()
1072 length = PyUnicode_GET_LENGTH(pystr); in scan_once_unicode()
1086 return scanstring_unicode(pystr, idx + 1, s->strict, next_idx_ptr); in scan_once_unicode()
1092 res = _parse_object_unicode(s, pystr, idx + 1, next_idx_ptr); in scan_once_unicode()
1100 res = _parse_array_unicode(s, pystr, idx + 1, next_idx_ptr); in scan_once_unicode()
1161 return _match_number_unicode(s, pystr, idx, next_idx_ptr); in scan_once_unicode()
1168 PyObject *pystr; in scanner_call() local
1176 if (!PyArg_ParseTupleAndKeywords(args, kwds, "On:scan_once", kwlist, &pystr, &idx)) in scanner_call()
1179 if (PyUnicode_Check(pystr)) { in scanner_call()
1180 rval = scan_once_unicode(s, pystr, idx, &next_idx); in scanner_call()
1185 Py_TYPE(pystr)->tp_name); in scanner_call()