mirror of
https://github.com/python/cpython.git
synced 2024-11-26 19:34:19 +08:00
Converted manually written code to the new K format specifier.
Untested, but at least it still compiles.
This commit is contained in:
parent
269b2a6797
commit
ecc6635ae4
@ -167,10 +167,10 @@ filldialogoptions(PyObject *d,
|
||||
}
|
||||
*defaultLocationP = defaultLocation_storage;
|
||||
} else if( strcmp(keystr, "version") == 0 ) {
|
||||
if ( !PyArg_Parse(value, "h", &opt->version) )
|
||||
if ( !PyArg_Parse(value, "H", &opt->version) )
|
||||
return 0;
|
||||
} else if( strcmp(keystr, "dialogOptionFlags") == 0 ) {
|
||||
if ( !PyArg_Parse(value, "l", &opt->dialogOptionFlags) )
|
||||
if ( !PyArg_Parse(value, "K", &opt->dialogOptionFlags) )
|
||||
return 0;
|
||||
} else if( strcmp(keystr, "location") == 0 ) {
|
||||
if ( !PyArg_Parse(value, "O&", PyMac_GetPoint, &opt->location) )
|
||||
@ -247,7 +247,7 @@ nav_NavTranslateFile(navrrobject *self, PyObject *args)
|
||||
NavTranslationOptions howToTranslate;
|
||||
OSErr err;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "l", &howToTranslate))
|
||||
if (!PyArg_ParseTuple(args, "K", &howToTranslate))
|
||||
return NULL;
|
||||
err = NavTranslateFile(&self->itself, howToTranslate);
|
||||
if ( err ) {
|
||||
@ -268,7 +268,7 @@ nav_NavCompleteSave(navrrobject *self, PyObject *args)
|
||||
NavTranslationOptions howToTranslate;
|
||||
OSErr err;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "l", &howToTranslate))
|
||||
if (!PyArg_ParseTuple(args, "K", &howToTranslate))
|
||||
return NULL;
|
||||
err = NavCompleteSave(&self->itself, howToTranslate);
|
||||
if ( err ) {
|
||||
@ -528,7 +528,7 @@ nav_NavAskSaveChanges(PyObject *self, PyObject *args, PyObject *kw)
|
||||
OSErr err;
|
||||
|
||||
if ( kw && PyObject_IsTrue(kw) ) {
|
||||
if (!PyArg_ParseTuple(args, "l", &action))
|
||||
if (!PyArg_ParseTuple(args, "K", &action))
|
||||
return NULL;
|
||||
dict = kw;
|
||||
} else if (!PyArg_ParseTuple(args, "lO!", &action, &PyDict_Type, &dict))
|
||||
|
@ -138,7 +138,7 @@ static PyObject *ScrapObj_PutScrapFlavor(ScrapObject *_self, PyObject *_args)
|
||||
ScrapFlavorFlags flavorFlags;
|
||||
char *flavorData__in__;
|
||||
int flavorData__in_len__;
|
||||
if (!PyArg_ParseTuple(_args, "O&ls#",
|
||||
if (!PyArg_ParseTuple(_args, "O&Ks#",
|
||||
PyMac_GetOSType, &flavorType,
|
||||
&flavorFlags,
|
||||
&flavorData__in__, &flavorData__in_len__))
|
||||
|
@ -415,7 +415,7 @@ PyMac_BuildPoint(Point p)
|
||||
int
|
||||
PyMac_GetEventRecord(PyObject *v, EventRecord *e)
|
||||
{
|
||||
return PyArg_Parse(v, "(Hll(hh)H)",
|
||||
return PyArg_Parse(v, "(HKK(hh)H)",
|
||||
&e->what,
|
||||
&e->message,
|
||||
&e->when,
|
||||
@ -471,7 +471,7 @@ PyMac_Getwide(PyObject *v, wide *rv)
|
||||
rv->hi = -1;
|
||||
return 1;
|
||||
}
|
||||
return PyArg_Parse(v, "(ll)", &rv->hi, &rv->lo);
|
||||
return PyArg_Parse(v, "(KK)", &rv->hi, &rv->lo);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user