mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Massive patch by Skip Montanaro to add ":name" to as many
PyArg_ParseTuple() format string arguments as possible.
This commit is contained in:
parent
a9b2b4be26
commit
43713e5a28
37 changed files with 272 additions and 272 deletions
|
@ -135,7 +135,7 @@ PyLocale_setlocale(self,args)
|
|||
char *locale=0,*result;
|
||||
PyObject *result_object;
|
||||
struct lconv *lc;
|
||||
if(!PyArg_ParseTuple(args,"i|z",&category,&locale))return 0;
|
||||
if(!PyArg_ParseTuple(args,"i|z:setlocale",&category,&locale))return 0;
|
||||
if(locale){
|
||||
/* set locale */
|
||||
result=setlocale(category,locale);
|
||||
|
@ -266,7 +266,7 @@ PyLocale_strcoll(self,args)
|
|||
PyObject *args;
|
||||
{
|
||||
char *s1,*s2;
|
||||
if(!PyArg_ParseTuple(args,"ss",&s1,&s2))
|
||||
if(!PyArg_ParseTuple(args,"ss:strcoll",&s1,&s2))
|
||||
return NULL;
|
||||
return PyInt_FromLong(strcoll(s1,s2));
|
||||
}
|
||||
|
@ -283,7 +283,7 @@ PyLocale_strxfrm(self,args)
|
|||
char *s,*buf;
|
||||
int n1,n2;
|
||||
PyObject *result;
|
||||
if(!PyArg_ParseTuple(args,"s",&s))
|
||||
if(!PyArg_ParseTuple(args,"s:strxfrm",&s))
|
||||
return NULL;
|
||||
/* assume no change in size, first */
|
||||
n1=strlen(s)+1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue