Lines Matching refs:argsize
390 size_t argsize = strlen(arg) + 1; in decode_ascii() local
397 if (argsize > PY_SSIZE_T_MAX / sizeof(wchar_t)) { in decode_ascii()
400 res = PyMem_RawMalloc(argsize * sizeof(wchar_t)); in decode_ascii()
440 size_t argsize; in decode_current_locale() local
458 argsize = strlen(arg); in decode_current_locale()
460 argsize = _Py_mbstowcs(NULL, arg, 0); in decode_current_locale()
462 if (argsize != DECODE_ERROR) { in decode_current_locale()
463 if (argsize > PY_SSIZE_T_MAX / sizeof(wchar_t) - 1) { in decode_current_locale()
466 res = (wchar_t *)PyMem_RawMalloc((argsize + 1) * sizeof(wchar_t)); in decode_current_locale()
471 count = _Py_mbstowcs(res, arg, argsize + 1); in decode_current_locale()
488 argsize = strlen(arg) + 1; in decode_current_locale()
489 if (argsize > PY_SSIZE_T_MAX / sizeof(wchar_t)) { in decode_current_locale()
492 res = (wchar_t*)PyMem_RawMalloc(argsize * sizeof(wchar_t)); in decode_current_locale()
500 while (argsize) { in decode_current_locale()
501 size_t converted = _Py_mbrtowc(out, (char*)in, argsize, &mbs); in decode_current_locale()
523 argsize--; in decode_current_locale()
533 argsize -= converted; in decode_current_locale()