mirror of
https://github.com/python/cpython.git
synced 2025-09-04 16:01:10 +00:00
Merge ssize_t branch.
This commit is contained in:
parent
4482929734
commit
18e165558b
102 changed files with 2659 additions and 1677 deletions
|
@ -313,6 +313,11 @@ do_mkvalue(const char **p_format, va_list *p_va)
|
|||
return PyInt_FromLong(n);
|
||||
}
|
||||
|
||||
case 'n':
|
||||
#if SIZEOF_SIZE_T!=SIZEOF_LONG
|
||||
return PyLong_FromSsize_t(va_arg(*p_va, Py_Ssize_t));
|
||||
#endif
|
||||
/* Fall through from 'n' to 'l' if Py_ssize_t is long */
|
||||
case 'l':
|
||||
return PyInt_FromLong(va_arg(*p_va, long));
|
||||
|
||||
|
@ -371,7 +376,7 @@ do_mkvalue(const char **p_format, va_list *p_va)
|
|||
case 'c':
|
||||
{
|
||||
char p[1];
|
||||
p[0] = va_arg(*p_va, int);
|
||||
p[0] = (char)va_arg(*p_va, int);
|
||||
return PyString_FromStringAndSize(p, 1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue