Lines Matching defs:str
1715 PyObject *str = NULL;
1832 str = PyUnicode_New(strlen, '9');
1833 if (str == NULL) {
1837 kind = PyUnicode_KIND(str);
1868 p = (TYPE*)PyUnicode_DATA(str) + strlen; \
1876 assert(p == (TYPE*)PyUnicode_DATA(str)); \
1909 assert(_PyUnicode_CheckConsistency(str, 1));
1910 *p_output = (PyObject *)str;
2094 PyObject *str;
2097 err = long_to_decimal_string_internal(obj, &str, NULL, NULL, NULL);
2099 err = long_format_binary(obj, base, 1, &str, NULL, NULL, NULL);
2102 return str;
2119 _PyLong_FormatBytesWriter(_PyBytesWriter *writer, char *str,
2125 str2 = str;
2164 /* *str points to the first digit in a string of base `base` digits. base
2165 * is a power of 2 (2, 4, 8, 16, or 32). *str is set to point to the first
2166 * non-digit (which may be *str!). A normalized int is returned.
2175 long_from_binary_base(const char **str, int base, PyLongObject **res)
2177 const char *p = *str;
2197 *str = p - 1;
2208 *str = p - 1;
2212 *str = p;
2270 PyLong_FromString(const char *str, char **pend, int base)
2273 const char *start, *orig_str = str;
2283 while (*str != '\0' && Py_ISSPACE(*str)) {
2284 str++;
2286 if (*str == '+') {
2287 ++str;
2289 else if (*str == '-') {
2290 ++str;
2294 if (str[0] != '0') {
2297 else if (str[1] == 'x' || str[1] == 'X') {
2300 else if (str[1] == 'o' || str[1] == 'O') {
2303 else if (str[1] == 'b' || str[1] == 'B') {
2313 if (str[0] == '0' &&
2314 ((base == 16 && (str[1] == 'x' || str[1] == 'X')) ||
2315 (base == 8 && (str[1] == 'o' || str[1] == 'O')) ||
2316 (base == 2 && (str[1] == 'b' || str[1] == 'B')))) {
2317 str += 2;
2319 if (*str == '_') {
2320 ++str;
2323 if (str[0] == '_') {
2328 start = str;
2331 int res = long_from_binary_base(&str, base, &z);
2379 size_z = (Py_ssize_t)((scan - str) * log_base_BASE[base]) + 1;
2457 scan = str;
2458 lastdigit = str;
2464 str = lastdigit + 1;
2478 str = lastdigit + 1;
2522 while (str < scan) {
2523 if (*str == '_') {
2524 str++;
2528 c = (digit)_PyLong_DigitValue[Py_CHARMASK(*str++)];
2529 for (i = 1; i < convwidth && str != scan; ++str) {
2530 if (*str == '_') {
2535 (int)_PyLong_DigitValue[Py_CHARMASK(*str)]);
2598 if (str == start) {
2604 while (*str && Py_ISSPACE(*str)) {
2605 str++;
2607 if (*str != '\0') {
2616 *pend = (char *)str;
2622 *pend = (char *)str;