PyArg_ParseTuple() format string arguments as possible.
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);
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));
}
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;
PyObject *res = NULL;
int err;
- if (!PyArg_ParseTuple(args, "s", &script))
+ if (!PyArg_ParseTuple(args, "s:eval", &script))
return NULL;
ENTER_TCL
PyObject *res = NULL;
int err;
- if (!PyArg_ParseTuple(args, "s", &script))
+ if (!PyArg_ParseTuple(args, "s:globaleval", &script))
return NULL;
ENTER_TCL
PyObject *res = NULL;
int err;
- if (!PyArg_ParseTuple(args, "s", &fileName))
+ if (!PyArg_ParseTuple(args, "s:evalfile", &fileName))
return NULL;
ENTER_TCL
{
char *msg;
- if (!PyArg_ParseTuple(args, "s", &msg))
+ if (!PyArg_ParseTuple(args, "s:adderrorinfo", &msg))
return NULL;
ENTER_TCL
Tcl_AddErrorInfo(Tkapp_Interp(self), msg);
if (!tmp)
return NULL;
- if (PyArg_ParseTuple(args, "sO", &name1, &newValue)) {
+ if (PyArg_ParseTuple(args, "sO:setvar", &name1, &newValue)) {
/* XXX Merge? */
s = AsString(newValue, tmp);
ENTER_TCL
}
else {
PyErr_Clear();
- if (PyArg_ParseTuple(args, "ssO", &name1, &name2, &newValue)) {
+ if (PyArg_ParseTuple(args, "ssO:setvar", &name1, &name2, &newValue)) {
s = AsString (newValue, tmp);
ENTER_TCL
ok = Tcl_SetVar2(Tkapp_Interp(self), name1, name2,
char *name1, *name2=NULL, *s;
PyObject *res = NULL;
- if (!PyArg_ParseTuple(args, "s|s", &name1, &name2))
+ if (!PyArg_ParseTuple(args, "s|s:getvar", &name1, &name2))
return NULL;
ENTER_TCL
if (name2 == NULL)
PyObject *res = NULL;
int code;
- if (!PyArg_ParseTuple(args, "s|s", &name1, &name2))
+ if (!PyArg_ParseTuple(args, "s|s:unsetvar", &name1, &name2))
return NULL;
ENTER_TCL
if (name2 == NULL)
char *s;
int v;
- if (!PyArg_ParseTuple(args, "s", &s))
+ if (!PyArg_ParseTuple(args, "s:getint", &s))
return NULL;
if (Tcl_GetInt(Tkapp_Interp(self), s, &v) == TCL_ERROR)
return Tkinter_Error(self);
char *s;
double v;
- if (!PyArg_ParseTuple(args, "s", &s))
+ if (!PyArg_ParseTuple(args, "s:getdouble", &s))
return NULL;
if (Tcl_GetDouble(Tkapp_Interp(self), s, &v) == TCL_ERROR)
return Tkinter_Error(self);
char *s;
int v;
- if (!PyArg_ParseTuple(args, "s", &s))
+ if (!PyArg_ParseTuple(args, "s:getboolean", &s))
return NULL;
if (Tcl_GetBoolean(Tkapp_Interp(self), s, &v) == TCL_ERROR)
return Tkinter_Error(self);
PyObject *res = NULL;
int retval;
- if (!PyArg_ParseTuple(args, "s", &s))
+ if (!PyArg_ParseTuple(args, "s:exprstring", &s))
return NULL;
ENTER_TCL
retval = Tcl_ExprString(Tkapp_Interp(self), s);
int retval;
long v;
- if (!PyArg_ParseTuple(args, "s", &s))
+ if (!PyArg_ParseTuple(args, "s:exprlong", &s))
return NULL;
ENTER_TCL
retval = Tcl_ExprLong(Tkapp_Interp(self), s, &v);
double v;
int retval;
- if (!PyArg_ParseTuple(args, "s", &s))
+ if (!PyArg_ParseTuple(args, "s:exprdouble", &s))
return NULL;
PyFPE_START_PROTECT("Tkapp_ExprDouble", return 0)
ENTER_TCL
int retval;
int v;
- if (!PyArg_ParseTuple(args, "s", &s))
+ if (!PyArg_ParseTuple(args, "s:exprboolean", &s))
return NULL;
ENTER_TCL
retval = Tcl_ExprBoolean(Tkapp_Interp(self), s, &v);
PyObject *v;
int i;
- if (!PyArg_ParseTuple(args, "s", &list))
+ if (!PyArg_ParseTuple(args, "s:splitlist", &list))
return NULL;
if (Tcl_SplitList(Tkapp_Interp(self), list, &argc, &argv) == TCL_ERROR)
{
char *list;
- if (!PyArg_ParseTuple(args, "s", &list))
+ if (!PyArg_ParseTuple(args, "s:split", &list))
return NULL;
return Split(list);
}
PyObject *func;
Tcl_Command err;
- if (!PyArg_ParseTuple(args, "sO", &cmdName, &func))
+ if (!PyArg_ParseTuple(args, "sO:createcommand", &cmdName, &func))
return NULL;
if (!PyCallable_Check(func)) {
PyErr_SetString(PyExc_TypeError, "command not callable");
char *cmdName;
int err;
- if (!PyArg_ParseTuple(args, "s", &cmdName))
+ if (!PyArg_ParseTuple(args, "s:deletecommand", &cmdName))
return NULL;
ENTER_TCL
err = Tcl_DeleteCommand(Tkapp_Interp(self), cmdName);
int mask, id;
FHANDLE tfile;
- if (!PyArg_ParseTuple(args, "OiO", &file, &mask, &func))
+ if (!PyArg_ParseTuple(args, "OiO:createfilehandler", &file, &mask, &func))
return NULL;
id = GetFileNo(file);
if (id < 0)
int id;
FHANDLE tfile;
- if (!PyArg_ParseTuple(args, "O", &file))
+ if (!PyArg_ParseTuple(args, "O:deletefilehandler", &file))
return NULL;
id = GetFileNo(file);
if (id < 0)
TkttObject *v = (TkttObject *)self;
PyObject *func = v->func;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":deletetimerhandler"))
return NULL;
if (v->token != NULL) {
Tcl_DeleteTimerHandler(v->token);
PyObject *func;
TkttObject *v;
- if (!PyArg_ParseTuple(args, "iO", &milliseconds, &func))
+ if (!PyArg_ParseTuple(args, "iO:createtimerhandler", &milliseconds, &func))
return NULL;
if (!PyCallable_Check(func)) {
PyErr_SetString(PyExc_TypeError, "bad argument list");
PyThreadState *tstate = PyThreadState_Get();
#endif
- if (!PyArg_ParseTuple(args, "|i", &threshold))
+ if (!PyArg_ParseTuple(args, "|i:mainloop", &threshold))
return NULL;
quitMainLoop = 0;
int flags = 0;
int rv;
- if (!PyArg_ParseTuple(args, "|i", &flags))
+ if (!PyArg_ParseTuple(args, "|i:dooneevent", &flags))
return NULL;
ENTER_TCL
PyObject *args;
{
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":quit"))
return NULL;
quitMainLoop = 1;
PyObject *args;
{
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":interpaddr"))
return NULL;
return PyInt_FromLong((long)Tkapp_Interp(self));
baseName = Py_GetProgramName();
className = "Tk";
- if (!PyArg_ParseTuple(args, "|zssi",
+ if (!PyArg_ParseTuple(args, "|zssi:create",
&screenName, &baseName, &className,
&interactive))
return NULL;
{
int par;
- if (!PyArg_ParseTuple(args, "i", &par))
+ if (!PyArg_ParseTuple(args, "i:SetConfig", &par))
return NULL;
if ((*func)(self->config, par) == -1)
{
int par;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":GetConfig"))
return NULL;
if ((par = (*func)(self->config)) == -1)
{
double maximum_value;
- if (!PyArg_ParseTuple(args, "d", &maximum_value))
+ if (!PyArg_ParseTuple(args, "d:SetFloatMax", &maximum_value))
return NULL;
if (alSetFloatMax(self->config, maximum_value) < 0)
return NULL;
{
double maximum_value;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":GetFloatMax"))
return NULL;
if ((maximum_value = alGetFloatMax(self->config)) == 0)
return NULL;
{
long par;
- if (!PyArg_ParseTuple(args, "l", &par))
+ if (!PyArg_ParseTuple(args, "l:SetConfig", &par))
return NULL;
if ((*func)(self->config, par) == -1)
{
long par;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":GetConfig"))
return NULL;
if ((par = (*func)(self->config)) == -1)
{
double arg;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":GetFloatMax"))
return 0;
if ((arg = ALgetfloatmax(self->config)) == 0)
return NULL;
{
double arg;
- if (!PyArg_ParseTuple(args, "d", &arg))
+ if (!PyArg_ParseTuple(args, "d:SetFloatMax", &arg))
return 0;
if (ALsetfloatmax(self->config, arg) == -1)
return NULL;
PyObject *args;
{
alcobject *config;
- if (!PyArg_ParseTuple(args, "O!", &Alctype, &config))
+ if (!PyArg_ParseTuple(args, "O!:SetConfig", &Alctype, &config))
return NULL;
if (alSetConfig(self->port, config->config) < 0)
return NULL;
PyObject *args;
{
ALconfig config;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":GetConfig"))
return NULL;
if ((config = alGetConfig(self->port)) == NULL)
return NULL;
{
int resource;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":GetResource"))
return NULL;
if ((resource = alGetResource(self->port)) == 0)
return NULL;
{
int fd;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":GetFD"))
return NULL;
if ((fd = alGetFD(self->port)) < 0)
{
int filled;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":GetFilled"))
return NULL;
if ((filled = alGetFilled(self->port)) < 0)
return NULL;
{
int fillable;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":GetFillable"))
return NULL;
if ((fillable = alGetFillable(self->port)) < 0)
return NULL;
int ch;
ALconfig c;
- if (!PyArg_ParseTuple(args, "i", &framecount))
+ if (!PyArg_ParseTuple(args, "i:ReadFrames", &framecount))
return NULL;
if (framecount < 0) {
PyErr_SetString(ErrorObject, "negative framecount");
{
int framecount;
- if (!PyArg_ParseTuple(args, "i", &framecount))
+ if (!PyArg_ParseTuple(args, "i:DiscardFrames", &framecount))
return NULL;
Py_BEGIN_ALLOW_THREADS
{
int framecount;
- if (!PyArg_ParseTuple(args, "i", &framecount))
+ if (!PyArg_ParseTuple(args, "i:ZeroFrames", &framecount))
return NULL;
if (framecount < 0) {
{
int fillpoint;
- if (!PyArg_ParseTuple(args, "i", &fillpoint))
+ if (!PyArg_ParseTuple(args, "i:SetFillPoint", &fillpoint))
return NULL;
if (alSetFillPoint(self->port, fillpoint) < 0)
{
int fillpoint;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":GetFillPoint"))
return NULL;
if ((fillpoint = alGetFillPoint(self->port)) < 0)
{
stamp_t fnum;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":GetFrameNumber"))
return NULL;
if (alGetFrameNumber(self->port, &fnum) < 0)
stamp_t fnum, time;
PyObject *ret, *v0, *v1;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":GetFrameTime"))
return NULL;
if (alGetFrameTime(self->port, &fnum, &time) < 0)
return NULL;
int size, ch;
ALconfig c;
- if (!PyArg_ParseTuple(args, "s#", &samples, &length))
+ if (!PyArg_ParseTuple(args, "s#:WriteFrames", &samples, &length))
return NULL;
c = alGetConfig(self->port);
switch (alGetSampFmt(c)) {
alpobject *self;
PyObject *args;
{
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":ClosePort"))
return NULL;
if (alClosePort(self->port) < 0)
return NULL;
alpobject *self;
PyObject *args;
{
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":ClosePort"))
return NULL;
if (ALcloseport(self->port) < 0)
return NULL;
}
static PyObject *
-alp_getfd (self, args)
+alp_getfd(self, args)
alpobject *self;
PyObject *args;
{
int fd;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":GetFD"))
return NULL;
if ((fd = ALgetfd(self-> port)) == -1)
return NULL;
{
long count;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":GetFilled"))
return NULL;
if ((count = ALgetfilled(self-> port)) == -1)
return NULL;
{
long count;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":GetFillable"))
return NULL;
if ((count = ALgetfillable(self-> port)) == -1)
return NULL;
int width;
int ret;
- if (!PyArg_ParseTuple(args, "l", &count))
+ if (!PyArg_ParseTuple(args, "l:readsamps", &count))
return NULL;
if (count <= 0) {
ALconfig c;
int ret;
- if (!PyArg_ParseTuple(args, "s#", &buf, &size))
+ if (!PyArg_ParseTuple(args, "s#:writesamps", &buf, &size))
return NULL;
c = ALgetconfig(self->port);
{
long count;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":GetFillPoint"))
return NULL;
if ((count = ALgetfillpoint(self->port)) == -1)
return NULL;
}
static PyObject *
-alp_setfillpoint (self, args)
+alp_setfillpoint(self, args)
alpobject *self;
PyObject *args;
{
long count;
- if (!PyArg_ParseTuple(args, "l", &count))
+ if (!PyArg_ParseTuple(args, "l:SetFillPoint", &count))
return NULL;
if (ALsetfillpoint(self->port, count) == -1)
return NULL;
{
alcobject *config;
- if (!PyArg_ParseTuple(args, "O!", &Alctype, &config))
+ if (!PyArg_ParseTuple(args, "O!:SetConfig", &Alctype, &config))
return NULL;
if (ALsetconfig(self->port, config->config) == -1)
return NULL;
{
ALconfig config;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":GetConfig"))
return NULL;
config = ALgetconfig(self->port);
if (config == NULL)
{
ALconfig config;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":NewConfig"))
return NULL;
if ((config = alNewConfig()) == NULL)
return NULL;
char *name, *dir;
alcobject *config = NULL;
- if (!PyArg_ParseTuple(args, "ss|O!", &name, &dir, &Alctype, &config))
+ if (!PyArg_ParseTuple(args, "ss|O!:OpenPort", &name, &dir, &Alctype, &config))
return NULL;
if ((port = alOpenPort(name, dir, config ? config->config : NULL)) == NULL)
return NULL;
ALparamInfo *propinfo = NULL;
PyObject *propobj = NULL;
- if (!PyArg_ParseTuple(args, "ii|O!", &source, &dest, &PyList_Type, &propobj))
+ if (!PyArg_ParseTuple(args, "ii|O!:Connect", &source, &dest, &PyList_Type, &propobj))
return NULL;
if (propobj != NULL) {
nprops = python2params(source, dest, propobj, &props, &propinfo);
{
int res;
- if (!PyArg_ParseTuple(args, "i", &res))
+ if (!PyArg_ParseTuple(args, "i:Disconnect", &res))
return NULL;
if (alDisconnect(res) < 0)
return NULL;
int i, j, npvs;
ALparamInfo *pinfo;
- if (!PyArg_ParseTuple(args, "iO!", &resource, &PyList_Type, &pvslist))
+ if (!PyArg_ParseTuple(args, "iO!:GetParams", &resource, &PyList_Type, &pvslist))
return NULL;
npvs = PyList_Size(pvslist);
pvs = PyMem_NEW(ALpv, npvs);
ALparamInfo *pinfo;
int npvs, i;
- if (!PyArg_ParseTuple(args, "iO!", &resource, &PyList_Type, &pvslist))
+ if (!PyArg_ParseTuple(args, "iO!:SetParams", &resource, &PyList_Type, &pvslist))
return NULL;
npvs = python2params(resource, -1, pvslist, &pvs, &pinfo);
if (npvs < 0)
PyObject *qualobj = NULL;
PyObject *res = NULL, *item;
- if (!PyArg_ParseTuple(args, "ii|O!", &resource, ¶m,
+ if (!PyArg_ParseTuple(args, "ii|O!:QueryValues", &resource, ¶m,
&PyList_Type, &qualobj))
return NULL;
if (qualobj != NULL) {
ALparamInfo pinfo;
PyObject *v, *item;;
- if (!PyArg_ParseTuple(args, "ii", &res, ¶m))
+ if (!PyArg_ParseTuple(args, "ii:GetParamInfo", &res, ¶m))
return NULL;
if (alGetParamInfo(res, param, &pinfo) < 0)
return NULL;
int res, start_res, type;
char *name;
- if (!PyArg_ParseTuple(args, "isi", &start_res, &name, &type))
+ if (!PyArg_ParseTuple(args, "isi:GetResourceByName", &start_res, &name, &type))
return NULL;
if ((res = alGetResourceByName(start_res, name, type)) == 0)
return NULL;
{
int type, subtype;
- if (!PyArg_ParseTuple(args, "ii", &type, &subtype))
+ if (!PyArg_ParseTuple(args, "ii:IsSubtype", &type, &subtype))
return NULL;
return PyInt_FromLong((long) alIsSubtype(type, subtype));
}
PyObject *args;
{
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":SetErrorHandler"))
return NULL;
Py_INCREF(Py_None);
return Py_None;
ALport port;
alcobject *config = NULL;
- if (!PyArg_ParseTuple(args, "ss|O!", &name, &dir, &Alctype, &config))
+ if (!PyArg_ParseTuple(args, "ss|O!:OpenPort", &name, &dir, &Alctype, &config))
return NULL;
if ((port = ALopenport(name, dir, config ? config->config : NULL)) == NULL)
return NULL;
{
ALconfig config;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":NewConfig"))
return NULL;
if ((config = ALnewconfig ()) == NULL)
return NULL;
PyObject *v = NULL;
int i;
- if (!PyArg_ParseTuple(args, "l", &device))
+ if (!PyArg_ParseTuple(args, "l:queryparams", &device))
return NULL;
if ((length = ALqueryparams(device, PVdummy, 2L)) == -1)
return NULL;
long device, descriptor;
char *name;
- if (!PyArg_ParseTuple(args, "ll", &device, &descriptor))
+ if (!PyArg_ParseTuple(args, "ll:getname", &device, &descriptor))
return NULL;
if ((name = ALgetname(device, descriptor)) == NULL)
return NULL;
{
long device, descriptor, value;
- if (!PyArg_ParseTuple(args, "ll", &device, &descriptor))
+ if (!PyArg_ParseTuple(args, "ll:getdefault", &device, &descriptor))
return NULL;
if ((value = ALgetdefault(device, descriptor)) == -1)
return NULL;
{
long device, descriptor, min, max;
- if (!PyArg_ParseTuple(args, "ll", &device, &descriptor))
+ if (!PyArg_ParseTuple(args, "ll:getminmax", &device, &descriptor))
return NULL;
min = -1;
max = -1;
weightA = 1;
weightB = 0;
- if (!PyArg_ParseTuple(args, "s#iiiiO|ii", &cp, &len, &size, &nchannels,
+ if (!PyArg_ParseTuple(args, "s#iiiiO|ii:ratecv", &cp, &len, &size, &nchannels,
&inrate, &outrate, &state, &weightA, &weightB))
return NULL;
if (size != 1 && size != 2 && size != 4) {
}
for (chan = 0; chan < nchannels; chan++) {
if (!PyArg_ParseTuple(PyTuple_GetItem(samps, chan),
- "ii",&prev_i[chan],&cur_i[chan]))
+ "ii:ratecv",&prev_i[chan],&cur_i[chan]))
goto exit;
}
}
PyObject *rv;
int ascii_len, bin_len;
- if ( !PyArg_ParseTuple(args, "t#", &ascii_data, &ascii_len) )
+ if ( !PyArg_ParseTuple(args, "t#:a2b_uu", &ascii_data, &ascii_len) )
return NULL;
/* First byte: binary data length (in bytes) */
PyObject *rv;
int bin_len;
- if ( !PyArg_ParseTuple(args, "s#", &bin_data, &bin_len) )
+ if ( !PyArg_ParseTuple(args, "s#:b2a_uu", &bin_data, &bin_len) )
return NULL;
if ( bin_len > 45 ) {
/* The 45 is a limit that appears in all uuencode's */
int ascii_len, bin_len;
int quad_pos = 0;
- if ( !PyArg_ParseTuple(args, "t#", &ascii_data, &ascii_len) )
+ if ( !PyArg_ParseTuple(args, "t#:a2b_base64", &ascii_data, &ascii_len) )
return NULL;
bin_len = ((ascii_len+3)/4)*3; /* Upper bound, corrected later */
PyObject *rv;
int bin_len;
- if ( !PyArg_ParseTuple(args, "s#", &bin_data, &bin_len) )
+ if ( !PyArg_ParseTuple(args, "s#:b2a_base64", &bin_data, &bin_len) )
return NULL;
if ( bin_len > BASE64_MAXBIN ) {
PyErr_SetString(Error, "Too much data for base64 line");
int len;
int done = 0;
- if ( !PyArg_ParseTuple(args, "t#", &ascii_data, &len) )
+ if ( !PyArg_ParseTuple(args, "t#:a2b_hqx", &ascii_data, &len) )
return NULL;
/* Allocate a string that is too big (fixed later) */
unsigned char ch;
int in, inend, len;
- if ( !PyArg_ParseTuple(args, "s#", &in_data, &len) )
+ if ( !PyArg_ParseTuple(args, "s#:rlecode_hqx", &in_data, &len) )
return NULL;
/* Worst case: output is twice as big as input (fixed later) */
PyObject *rv;
int len;
- if ( !PyArg_ParseTuple(args, "s#", &bin_data, &len) )
+ if ( !PyArg_ParseTuple(args, "s#:b2a_hqx", &bin_data, &len) )
return NULL;
/* Allocate a buffer that is at least large enough */
PyObject *rv;
int in_len, out_len, out_len_left;
- if ( !PyArg_ParseTuple(args, "s#", &in_data, &in_len) )
+ if ( !PyArg_ParseTuple(args, "s#:rledecode_hqx", &in_data, &in_len) )
return NULL;
/* Empty string is a special case */
unsigned int crc;
int len;
- if ( !PyArg_ParseTuple(args, "s#i", &bin_data, &len, &crc) )
+ if ( !PyArg_ParseTuple(args, "s#i:crc_hqx", &bin_data, &len, &crc) )
return NULL;
while(len--) {
unsigned long crc = 0UL; /* initial value of CRC */
int len;
- if ( !PyArg_ParseTuple(args, "s#|l", &bin_data, &len, &crc) )
+ if ( !PyArg_ParseTuple(args, "s#|l:crc32", &bin_data, &len, &crc) )
return NULL;
crc = crc ^ 0xFFFFFFFFUL;
int hash = 0; /* XXX currently ignored */
int lorder = 0;
- if (!PyArg_ParseTuple(args, "s|siiiiiii",
+ if (!PyArg_ParseTuple(args, "s|siiiiiii:hashopen",
&file, &flag, &mode,
&bsize, &ffactor, &nelem, &cachesize,
&hash, &lorder))
unsigned int psize = 0;
int lorder = 0;
- if (!PyArg_ParseTuple(args, "s|siiiiiii",
+ if (!PyArg_ParseTuple(args, "s|siiiiiii:btopen",
&file, &flag, &mode,
&btflags, &cachesize, &maxkeypage, &minkeypage,
&psize, &lorder))
char *bval = "";
char *bfname = NULL;
- if (!PyArg_ParseTuple(args, "s|siiiiiiss",
+ if (!PyArg_ParseTuple(args, "s|siiiiiiss:rnopen",
&file, &flag, &mode,
&rnflags, &cachesize, &psize, &lorder,
&reclen, &bval, &bfname))
static PyObject *
Pickle_clear_memo(Picklerobject *self, PyObject *args) {
- if (args && ! PyArg_ParseTuple(args,"")) return NULL;
+ if (args && ! PyArg_ParseTuple(args,":clear_memo")) return NULL;
if (self->memo) PyDict_Clear(self->memo);
Py_INCREF(Py_None);
return Py_None;
char *s, *p, *have_get;
Pdata *data;
- if (args && ! PyArg_ParseTuple(args,"|i",&clear)) return NULL;
+ if (args && ! PyArg_ParseTuple(args,"|i:getvalue",&clear)) return NULL;
/* Check to make sure we are based on a list */
if (! Pdata_Check(self->file)) {
PyObject *ob;
int get=0;
- UNLESS (PyArg_ParseTuple(args, "O|i", &ob, &get))
+ UNLESS (PyArg_ParseTuple(args, "O|i:dump", &ob, &get))
return NULL;
if (dump(self, ob) < 0)
int bin;
bin=1;
- if (! PyArg_ParseTuple(args, "|i", &bin)) {
+ if (! PyArg_ParseTuple(args, "|i:Pickler", &bin)) {
PyErr_Clear();
bin=0;
- if (! PyArg_ParseTuple(args, "O|i", &file, &bin))
+ if (! PyArg_ParseTuple(args, "O|i:Pickler", &file, &bin))
return NULL;
}
return (PyObject *)newPicklerobject(file, bin);
static PyObject *
Unpickler_load(Unpicklerobject *self, PyObject *args) {
- UNLESS (PyArg_ParseTuple(args, ""))
+ UNLESS (PyArg_ParseTuple(args, ":load"))
return NULL;
return load(self);
static PyObject *
Unpickler_noload(Unpicklerobject *self, PyObject *args) {
- UNLESS (PyArg_ParseTuple(args, ""))
+ UNLESS (PyArg_ParseTuple(args, ":noload"))
return NULL;
return noload(self);
get_Unpickler(PyObject *self, PyObject *args) {
PyObject *file;
- UNLESS (PyArg_ParseTuple(args, "O", &file))
+ UNLESS (PyArg_ParseTuple(args, "O:Unpickler", &file))
return NULL;
return (PyObject *)newUnpicklerobject(file);
}
Picklerobject *pickler = 0;
int bin = 0;
- UNLESS (PyArg_ParseTuple(args, "O|i", &ob, &bin))
+ UNLESS (PyArg_ParseTuple(args, "O|i:dumps", &ob, &bin))
goto finally;
UNLESS (file = PycStringIO->NewOutput(128))
Unpicklerobject *unpickler = 0;
PyObject *ob, *res = NULL;
- UNLESS (PyArg_ParseTuple(args, "O", &ob))
+ UNLESS (PyArg_ParseTuple(args, "O:load", &ob))
goto finally;
UNLESS (unpickler = newUnpicklerobject(ob))
PyObject *ob, *file = 0, *res = NULL;
Unpicklerobject *unpickler = 0;
- UNLESS (PyArg_ParseTuple(args, "S", &ob))
+ UNLESS (PyArg_ParseTuple(args, "S:loads", &ob))
goto finally;
UNLESS (file = PycStringIO->NewInput(ob))
O_seek(Oobject *self, PyObject *args) {
int position, mode = 0;
- UNLESS(PyArg_ParseTuple(args, "i|i", &position, &mode)) {
+ UNLESS(PyArg_ParseTuple(args, "i|i:seek", &position, &mode)) {
return NULL;
}
int n = -1;
char *output;
- UNLESS(PyArg_ParseTuple(args, "|i", &n)) return NULL;
+ UNLESS(PyArg_ParseTuple(args, "|i:read", &n)) return NULL;
n=O_cread((PyObject*)self,&output,n);
char *c;
int l;
- UNLESS(PyArg_ParseTuple(args, "O", &s)) return NULL;
+ UNLESS(PyArg_ParseTuple(args, "O:write", &s)) return NULL;
UNLESS(-1 != (l=PyString_Size(s))) return NULL;
UNLESS(c=PyString_AsString(s)) return NULL;
UNLESS(-1 != O_cwrite((PyObject*)self,c,l)) return NULL;
int s;
use_pos=Py_None;
- UNLESS(PyArg_ParseTuple(args,"|O",&use_pos)) return NULL;
+ UNLESS(PyArg_ParseTuple(args,"|O:getval",&use_pos)) return NULL;
if(PyObject_IsTrue(use_pos)) {
s=self->pos;
if (s > self->string_size) s=self->string_size;
PyObject *string_module = 0;
static PyObject *string_joinfields = 0;
- UNLESS(PyArg_ParseTuple(args, "O", &args)) {
+ UNLESS(PyArg_ParseTuple(args, "O:writelines", &args)) {
return NULL;
}
I_seek(Oobject *self, PyObject *args) {
int position, mode = 0;
- UNLESS(PyArg_ParseTuple(args, "i|i", &position, &mode)) {
+ UNLESS(PyArg_ParseTuple(args, "i|i:seek", &position, &mode)) {
return NULL;
}
IO_StringIO(PyObject *self, PyObject *args) {
PyObject *s=0;
- UNLESS(PyArg_ParseTuple(args, "|O", &s)) return NULL;
+ UNLESS(PyArg_ParseTuple(args, "|O:StringIO", &s)) return NULL;
if(s) return newIobject(s);
return newOobject(128);
}
cdplayerobject *self;
PyObject *args;
{
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":allowremoval"))
return NULL;
CDallowremoval(self->ob_cdplayer);
cdplayerobject *self;
PyObject *args;
{
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":preventremoval"))
return NULL;
CDpreventremoval(self->ob_cdplayer);
cdplayerobject *self;
PyObject *args;
{
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":bestreadsize"))
return NULL;
return PyInt_FromLong((long) CDbestreadsize(self->ob_cdplayer));
cdplayerobject *self;
PyObject *args;
{
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":close"))
return NULL;
if (!CDclose(self->ob_cdplayer)) {
{
CDSTATUS status;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":eject"))
return NULL;
if (!CDeject(self->ob_cdplayer)) {
{
CDSTATUS status;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":getstatus"))
return NULL;
if (!CDgetstatus(self->ob_cdplayer, &status)) {
CDTRACKINFO info;
CDSTATUS status;
- if (!PyArg_ParseTuple(args, "i", &track))
+ if (!PyArg_ParseTuple(args, "i:gettrackinfo", &track))
return NULL;
if (!CDgettrackinfo(self->ob_cdplayer, track, &info)) {
{
int min, sec, frame;
- if (!PyArg_ParseTuple(args, "iii", &min, &sec, &frame))
+ if (!PyArg_ParseTuple(args, "iii:msftoblock", &min, &sec, &frame))
return NULL;
return PyInt_FromLong((long) CDmsftoblock(self->ob_cdplayer,
int start, play;
CDSTATUS status;
- if (!PyArg_ParseTuple(args, "ii", &start, &play))
+ if (!PyArg_ParseTuple(args, "ii:play", &start, &play))
return NULL;
if (!CDplay(self->ob_cdplayer, start, play)) {
int min, sec, frame, play;
CDSTATUS status;
- if (!PyArg_ParseTuple(args, "iiii", &min, &sec, &frame, &play))
+ if (!PyArg_ParseTuple(args, "iiii:playabs", &min, &sec, &frame, &play))
return NULL;
if (!CDplayabs(self->ob_cdplayer, min, sec, frame, play)) {
int start, play;
CDSTATUS status;
- if (!PyArg_ParseTuple(args, "ii", &start, &play))
+ if (!PyArg_ParseTuple(args, "ii:playtrack", &start, &play))
return NULL;
if (!CDplaytrack(self->ob_cdplayer, start, play)) {
int track, min, sec, frame, play;
CDSTATUS status;
- if (!PyArg_ParseTuple(args, "iiiii", &track, &min, &sec,
+ if (!PyArg_ParseTuple(args, "iiiii:playtrackabs", &track, &min, &sec,
&frame, &play))
return NULL;
int numframes, n;
PyObject *result;
- if (!PyArg_ParseTuple(args, "i", &numframes))
+ if (!PyArg_ParseTuple(args, "i:readda", &numframes))
return NULL;
result = PyString_FromStringAndSize(NULL, numframes * sizeof(CDFRAME));
int min, sec, frame;
long PyTryBlock;
- if (!PyArg_ParseTuple(args, "iii", &min, &sec, &frame))
+ if (!PyArg_ParseTuple(args, "iii:seek", &min, &sec, &frame))
return NULL;
PyTryBlock = CDseek(self->ob_cdplayer, min, sec, frame);
int track;
long PyTryBlock;
- if (!PyArg_ParseTuple(args, "i", &track))
+ if (!PyArg_ParseTuple(args, "i:seektrack", &track))
return NULL;
PyTryBlock = CDseektrack(self->ob_cdplayer, track);
{
unsigned long PyTryBlock;
- if (!PyArg_ParseTuple(args, "l", &PyTryBlock))
+ if (!PyArg_ParseTuple(args, "l:seekblock", &PyTryBlock))
return NULL;
PyTryBlock = CDseekblock(self->ob_cdplayer, PyTryBlock);
{
CDSTATUS status;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":stop"))
return NULL;
if (!CDstop(self->ob_cdplayer)) {
{
CDSTATUS status;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":togglepause"))
return NULL;
if (!CDtogglepause(self->ob_cdplayer)) {
*/
dev = NULL;
direction = "r";
- if (!PyArg_ParseTuple(args, "|zs", &dev, &direction))
+ if (!PyArg_ParseTuple(args, "|zs:open", &dev, &direction))
return NULL;
cdp = CDopen(dev, direction);
{
int i;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":deleteparser"))
return NULL;
CDdeleteparser(self->ob_cdparser);
int length;
CDFRAME *p;
- if (!PyArg_ParseTuple(args, "s#", &cdfp, &length))
+ if (!PyArg_ParseTuple(args, "s#:parseframe", &cdfp, &length))
return NULL;
if (length % sizeof(CDFRAME) != 0) {
{
int type;
- if (!PyArg_ParseTuple(args, "i", &type))
+ if (!PyArg_ParseTuple(args, "i:removecallback", &type))
return NULL;
if (type < 0 || type >= NCALLBACKS) {
cdparserobject *self;
PyObject *args;
{
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":resetparser"))
return NULL;
CDresetparser(self->ob_cdparser);
PyObject *func, *funcarg;
/* XXX - more work here */
- if (!PyArg_ParseTuple(args, "iOO", &type, &func, &funcarg))
+ if (!PyArg_ParseTuple(args, "iOO:addcallback", &type, &func, &funcarg))
return NULL;
if (type < 0 || type >= NCALLBACKS) {
{
CDPARSER *cdp;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":createparser"))
return NULL;
cdp = CDcreateparser();
if (cdp == NULL) {
{
int min, sec, frame;
- if (!PyArg_ParseTuple(args, "iii", &min, &sec, &frame))
+ if (!PyArg_ParseTuple(args, "iii:msftoframe", &min, &sec, &frame))
return NULL;
return PyInt_FromLong((long) CDmsftoframe(min, sec, frame));
int iflags;
int mode = 0666;
- if ( !PyArg_ParseTuple(args, "s|si", &name, &flags, &mode) )
+ if ( !PyArg_ParseTuple(args, "s|si:open", &name, &flags, &mode) )
return NULL;
if ( strcmp(flags, "r") == 0 )
iflags = O_RDONLY;
int fd, code, ret, whence = 0;
PyObject *lenobj = NULL, *startobj = NULL;
- if (!PyArg_ParseTuple(args, "ii|OOi", &fd, &code,
+ if (!PyArg_ParseTuple(args, "ii|OOi:lockf", &fd, &code,
&lenobj, &startobj, &whence))
return NULL;
int iflags;
int mode = 0666;
- if ( !PyArg_ParseTuple(args, "s|si", &name, &flags, &mode) )
+ if ( !PyArg_ParseTuple(args, "s|si:open", &name, &flags, &mode) )
return NULL;
switch (flags[0]) {
case 'r':
unsigned char *cp = NULL;
int len = 0;
- if (!PyArg_ParseTuple(args, "|s#", &cp, &len))
+ if (!PyArg_ParseTuple(args, "|s#:new", &cp, &len))
return NULL;
if ((md5p = newmd5object()) == NULL)
PyObject* klass;
PyObject *dict;
PyInstanceObject *inst;
- if (!PyArg_ParseTuple(args, "O!O!",
+ if (!PyArg_ParseTuple(args, "O!O!:instance",
&PyClass_Type, &klass,
&PyDict_Type, &dict))
return NULL;
PyObject* self;
PyObject* classObj;
- if (!PyArg_ParseTuple(args, "OOO!",
+ if (!PyArg_ParseTuple(args, "OOO!:instancemethod",
&func,
&self,
&PyClass_Type, &classObj))
PyObject* defaults = Py_None;
PyFunctionObject* newfunc;
- if (!PyArg_ParseTuple(args, "O!O!|SO!",
+ if (!PyArg_ParseTuple(args, "O!O!|SO!:function",
&PyCode_Type, &code,
&PyDict_Type, &globals,
&name,
PyObject* lnotab;
PyBufferProcs *pb;
- if (!PyArg_ParseTuple(args, "iiiiOO!O!O!SSiS",
+ if (!PyArg_ParseTuple(args, "iiiiOO!O!O!SSiS:code",
&argcount, &nlocals, &stacksize, &flags,
&code,
&PyTuple_Type, &consts,
{
char *name;
- if (!PyArg_ParseTuple(args, "s", &name))
+ if (!PyArg_ParseTuple(args, "s:module", &name))
return NULL;
return PyModule_New(name);
}
PyObject * classes;
PyObject * dict;
- if (!PyArg_ParseTuple(args, "SO!O!", &name, &PyTuple_Type, &classes,
+ if (!PyArg_ParseTuple(args, "SO!O!:class", &name, &PyTuple_Type, &classes,
&PyDict_Type, &dict))
return NULL;
return PyClass_New(classes, dict, name);
int offsets[100*2];
PyObject *list;
- if (!PyArg_ParseTuple(args, "t#|iiii", &string, &stringlen, &pos, &endpos, &options))
+ if (!PyArg_ParseTuple(args, "t#|iiii:match", &string, &stringlen, &pos, &endpos, &options))
return NULL;
if (endpos == -1) {endpos = stringlen;}
count = pcre_exec(self->regex, self->regex_extra,
const char *error;
int options, erroroffset;
- if (!PyArg_ParseTuple(args, "siO!", &pattern, &options,
+ if (!PyArg_ParseTuple(args, "siO!:pcre_compile", &pattern, &options,
&PyDict_Type, &dictionary))
return NULL;
rv = newPcreObject(args);
unsigned char *repl;
int size, total_len, i, start, pos;
- if (!PyArg_ParseTuple(args, "OS", &match_obj, &repl_obj))
+ if (!PyArg_ParseTuple(args, "OS:pcre_expand", &match_obj, &repl_obj))
return NULL;
repl=(unsigned char *)PyString_AsString(repl_obj);
long memrep;
int id;
- if (!PyArg_ParseTuple(args, "li", &memrep, &id))
+ if (!PyArg_ParseTuple(args, "li:purify_set_pool_id", &memrep, &id))
return NULL;
purify_set_pool_id((char*)memrep, id);
long memrep;
long datarep;
- if (!PyArg_ParseTuple(args, "ll", &memrep, &datarep))
+ if (!PyArg_ParseTuple(args, "ll:purify_set_user_data", &memrep, &datarep))
return NULL;
purify_set_user_data((char*)memrep, (void*)datarep);
long memrep;
void* data;
- if (!PyArg_ParseTuple(args, "l", &memrep))
+ if (!PyArg_ParseTuple(args, "l:purify_get_user_data", &memrep))
return NULL;
data = purify_get_user_data((char*)memrep);
PyObject* arg_callable;
int id;
- if (!PyArg_ParseTuple(args, "iO", &id, &arg_callable))
+ if (!PyArg_ParseTuple(args, "iO:purify_map_pool", &id, &arg_callable))
return NULL;
if (!PyCallable_Check(arg_callable)) {
PyObject* saved_callable = MapCallable;
PyObject* arg_callable;
- if (!PyArg_ParseTuple(args, "O", &arg_callable))
+ if (!PyArg_ParseTuple(args, "O:purify_map_pool_id", &arg_callable))
return NULL;
if (!PyCallable_Check(arg_callable)) {
int status;
char* stringarg;
- if (!PyArg_ParseTuple(args, "s", &stringarg))
+ if (!PyArg_ParseTuple(args, "s:purify_name_thread", &stringarg))
return NULL;
status = purify_name_thread(stringarg);
char* type;
int status;
- if (!PyArg_ParseTuple(args, "lis", &addrrep, &size, &type))
+ if (!PyArg_ParseTuple(args, "lis:purify_watch_n", &addrrep, &size, &type))
return NULL;
status = purify_watch_n((char*)addrrep, size, type);
int watchno;
int status;
- if (!PyArg_ParseTuple(args, "i", &watchno))
+ if (!PyArg_ParseTuple(args, "i:purify_watch_remove", &watchno))
return NULL;
status = purify_watch_remove(watchno);
long addrrep;
char* rtn;
- if (!PyArg_ParseTuple(args, "l", &addrrep))
+ if (!PyArg_ParseTuple(args, "l:purify_describe", &addrrep))
return NULL;
rtn = purify_describe((char*)addrrep);
unsigned int size;
int status;
- if (!PyArg_ParseTuple(args, "li", &addrrep, &size))
+ if (!PyArg_ParseTuple(args, "li:purify_what_colors", &addrrep, &size))
return NULL;
status = purify_what_colors((char*)addrrep, size);
{
int status;
- if (!PyArg_ParseTuple(args, "i", &status))
+ if (!PyArg_ParseTuple(args, "i:purify_exit", &status))
return NULL;
/* purify_exit doesn't always act like exit(). See the manual */
PyObject *args;
{
char *s, *copy;
- if (!PyArg_ParseTuple(args, "s", &s))
+ if (!PyArg_ParseTuple(args, "s:parse_and_bind", &s))
return NULL;
/* Make a copy -- rl_parse_and_bind() modifies its argument */
/* Bernard Herzog */
PyObject *args;
{
char *s = NULL;
- if (!PyArg_ParseTuple(args, "|z", &s))
+ if (!PyArg_ParseTuple(args, "|z:read_init_file", &s))
return NULL;
errno = rl_read_init_file(s);
if (errno)
{
char *break_chars;
- if(!PyArg_ParseTuple(args, "s", &break_chars)) {
+ if(!PyArg_ParseTuple(args, "s:set_completer_delims", &break_chars)) {
return NULL;
}
free(rl_completer_word_break_characters);
PyObject *args;
{
PyObject *function = Py_None;
- if (!PyArg_ParseTuple(args, "|O", &function))
+ if (!PyArg_ParseTuple(args, "|O:set_completer", &function))
return NULL;
if (function == Py_None) {
Py_XDECREF(completer);
PyObject *args;
{
char *s;
- if (!PyArg_ParseTuple(args, "s", &s))
+ if (!PyArg_ParseTuple(args, "s:insert_text", &s))
return NULL;
rl_insert_text(s);
Py_INCREF(Py_None);
int offset = 0;
int result;
- if (!PyArg_ParseTuple(args, "O|i", &argstring, &offset))
+ if (!PyArg_ParseTuple(args, "O|i:match", &argstring, &offset))
return NULL;
if (!PyArg_Parse(argstring, "t#", &buffer, &size))
return NULL;
int range;
int result;
- if (!PyArg_ParseTuple(args, "O|i", &argstring, &offset))
+ if (!PyArg_ParseTuple(args, "O|i:search", &argstring, &offset))
return NULL;
- if (!PyArg_Parse(argstring, "t#", &buffer, &size))
+ if (!PyArg_Parse(argstring, "t#:search", &buffer, &size))
return NULL;
if (offset < 0 || offset > size) {
PyObject *pat = NULL;
PyObject *tran = NULL;
- if (!PyArg_ParseTuple(args, "S|S", &pat, &tran))
+ if (!PyArg_ParseTuple(args, "S|S:compile", &pat, &tran))
return NULL;
return newregexobject(pat, tran, pat, NULL);
}
PyObject *npattern;
PyObject *retval = NULL;
- if (!PyArg_ParseTuple(args, "S|S", &pattern, &tran))
+ if (!PyArg_ParseTuple(args, "S|S:symcomp", &pattern, &tran))
return NULL;
gdict = PyDict_New();
int who;
struct rusage ru;
- if (!PyArg_ParseTuple(args, "i", &who))
+ if (!PyArg_ParseTuple(args, "i:getrusage", &who))
return NULL;
if (getrusage(who, &ru) == -1) {
struct rlimit rl;
int resource;
- if (!PyArg_ParseTuple(args, "i", &resource))
+ if (!PyArg_ParseTuple(args, "i:getrlimit", &resource))
return NULL;
if (resource < 0 || resource >= RLIM_NLIMITS) {
int resource;
PyObject *curobj, *maxobj;
- if (!PyArg_ParseTuple(args, "i(OO)", &resource, &curobj, &maxobj))
+ if (!PyArg_ParseTuple(args, "i(OO):setrlimit", &resource, &curobj, &maxobj))
return NULL;
if (resource < 0 || resource >= RLIM_NLIMITS) {
PyObject *self;
PyObject *args;
{
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":getpagesize"))
return NULL;
return Py_BuildValue("i", getpagesize());
}
{
char *key;
- if (!PyArg_ParseTuple(args, "s", &key))
+ if (!PyArg_ParseTuple(args, "s:setkey", &key))
return NULL;
set_key(self, key);
int len;
int num_rotors = 6;
- if (!PyArg_ParseTuple(args, "s#|i", &string, &len, &num_rotors))
+ if (!PyArg_ParseTuple(args, "s#|i:newrotor", &string, &len, &num_rotors))
return NULL;
r = rotorobj_new(num_rotors, string);
int n;
/* convert arguments */
- if (!PyArg_ParseTuple(args, "OOO|O",
+ if (!PyArg_ParseTuple(args, "OOO|O:select",
&ifdlist, &ofdlist, &efdlist, &tout))
return NULL;
if ((new = newSHAobject()) == NULL)
return NULL;
- if (!PyArg_ParseTupleAndKeywords(args, kwdict, "|s#", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(args, kwdict, "|s#:new", kwlist,
&cp, &len)) {
Py_DECREF(new);
return NULL;
FILE *fp;
PyObject *f;
- if (!PyArg_ParseTuple(args, "|si", &mode, &bufsize))
+ if (!PyArg_ParseTuple(args, "|si:makefile", &mode, &bufsize))
return NULL;
#ifdef MS_WIN32
if (((fd = _open_osfhandle(s->sock_fd, _O_BINARY)) < 0) ||
{
int len, n, flags = 0;
PyObject *buf;
- if (!PyArg_ParseTuple(args, "i|i", &len, &flags))
+ if (!PyArg_ParseTuple(args, "i|i:recv", &len, &flags))
return NULL;
buf = PyString_FromStringAndSize((char *) 0, len);
if (buf == NULL)
PyObject *ret = NULL;
int addrlen, len, n, flags = 0;
- if (!PyArg_ParseTuple(args, "i|i", &len, &flags))
+ if (!PyArg_ParseTuple(args, "i|i:recvfrom", &len, &flags))
return NULL;
if (!getsockaddrlen(s, &addrlen))
return NULL;
{
char *buf;
int len, n, flags = 0;
- if (!PyArg_ParseTuple(args, "s#|i", &buf, &len, &flags))
+ if (!PyArg_ParseTuple(args, "s#|i:send", &buf, &len, &flags))
return NULL;
Py_BEGIN_ALLOW_THREADS
n = send(s->sock_fd, buf, len, flags);
int fd;
#endif
int family, type, proto = 0;
- if (!PyArg_ParseTuple(args, "ii|i", &family, &type, &proto))
+ if (!PyArg_ParseTuple(args, "ii|i:socket", &family, &type, &proto))
return NULL;
Py_BEGIN_ALLOW_THREADS
fd = socket(family, type, proto);
{
PySocketSockObject *s;
int fd, family, type, proto = 0;
- if (!PyArg_ParseTuple(args, "iii|i", &fd, &family, &type, &proto))
+ if (!PyArg_ParseTuple(args, "iii|i:fromfd", &fd, &family, &type, &proto))
return NULL;
/* Dup the fd so it and the socket can be closed independently */
fd = dup(fd);
char *key_file;
char *cert_file;
- if (!PyArg_ParseTuple(args, "O!zz",
+ if (!PyArg_ParseTuple(args, "O!zz:ssl",
&PySocketSock_Type, (PyObject*)&Sock,
&key_file, &cert_file) )
return NULL;
char *data;
int len = 0;
- if (!PyArg_ParseTuple(args, "s|i", &data, &len))
+ if (!PyArg_ParseTuple(args, "s|i:write", &data, &len))
return NULL;
if (!len)
int len = 1024;
int res;
- PyArg_ParseTuple(args, "|i", &len);
+ PyArg_ParseTuple(args, "|i:read", &len);
if (!(buf = PyString_FromStringAndSize((char *) 0, len)))
return NULL; /* Error object should already be set */
char *str;
char sdx[7];
- if(!PyArg_ParseTuple( args, "s", &str))
+ if(!PyArg_ParseTuple( args, "s:get_soundex", &str))
return NULL;
soundex_hash(str, sdx);
char *str1, *str2;
char res1[7], res2[7];
- if(!PyArg_ParseTuple(args, "ss", &str1, &str2))
+ if(!PyArg_ParseTuple(args, "ss:sound_similar", &str1, &str2))
return NULL;
soundex_hash(str1, res1);
n = 0;
splitcount = 0;
maxsplit = 0;
- if (!PyArg_ParseTuple(args, "t#|z#i", &s, &len, &sub, &n, &maxsplit))
+ if (!PyArg_ParseTuple(args, "t#|z#i:split", &s, &len, &sub, &n, &maxsplit))
return NULL;
if (sub == NULL)
return split_whitespace(s, len, maxsplit);
char* p = NULL;
intargfunc getitemfunc;
- if (!PyArg_ParseTuple(args, "O|t#", &seq, &sep, &seplen))
+ if (!PyArg_ParseTuple(args, "O|t#:join", &seq, &sep, &seplen))
return NULL;
if (sep == NULL) {
sep = " ";
char *s, *sub;
int len, n, i = 0, last = INT_MAX;
- if (!PyArg_ParseTuple(args, "t#t#|ii", &s, &len, &sub, &n, &i, &last))
+ if (!PyArg_ParseTuple(args, "t#t#|ii:find", &s, &len, &sub, &n, &i, &last))
return NULL;
if (last > len)
int len, n, j;
int i = 0, last = INT_MAX;
- if (!PyArg_ParseTuple(args, "t#t#|ii", &s, &len, &sub, &n, &i, &last))
+ if (!PyArg_ParseTuple(args, "t#t#|ii:rfind", &s, &len, &sub, &n, &i, &last))
return NULL;
if (last > len)
int tabsize = 8;
/* Get arguments */
- if (!PyArg_ParseTuple(args, "s#|i", &string, &stringlen, &tabsize))
+ if (!PyArg_ParseTuple(args, "s#|i:expandtabs", &string, &stringlen, &tabsize))
return NULL;
if (tabsize < 1) {
PyErr_SetString(PyExc_ValueError,
int i = 0, last = INT_MAX;
int m, r;
- if (!PyArg_ParseTuple(args, "t#t#|ii", &s, &len, &sub, &n, &i, &last))
+ if (!PyArg_ParseTuple(args, "t#t#|ii:count", &s, &len, &sub, &n, &i, &last))
return NULL;
if (last > len)
last = len;
long x;
char buffer[256]; /* For errors */
- if (!PyArg_ParseTuple(args, "s|i", &s, &base))
+ if (!PyArg_ParseTuple(args, "s|i:atoi", &s, &base))
return NULL;
if ((base != 0 && base < 2) || base > 36) {
PyObject *x;
char buffer[256]; /* For errors */
- if (!PyArg_ParseTuple(args, "s|i", &s, &base))
+ if (!PyArg_ParseTuple(args, "s|i:atol", &s, &base))
return NULL;
if ((base != 0 && base < 2) || base > 36) {
double x;
char buffer[256]; /* For errors */
- if (!PyArg_ParseTuple(args, "s", &s))
+ if (!PyArg_ParseTuple(args, "s:atof", &s))
return NULL;
while (*s && isspace(Py_CHARMASK(*s)))
s++;
int i, fromlen=0, tolen=0;
PyObject *result;
- if (!PyArg_ParseTuple(args, "t#t#", &from, &fromlen, &to, &tolen))
+ if (!PyArg_ParseTuple(args, "t#t#:maketrans", &from, &fromlen, &to, &tolen))
return NULL;
if (fromlen != tolen) {
PyObject *result;
int trans_table[256];
- if (!PyArg_ParseTuple(args, "St#|t#", &input_obj,
+ if (!PyArg_ParseTuple(args, "St#|t#:translate", &input_obj,
&table1, &tablen, &del_table, &dellen))
return NULL;
if (tablen != 256) {
int count = 0;
PyObject *new;
- if (!PyArg_ParseTuple(args, "t#t#t#|i",
+ if (!PyArg_ParseTuple(args, "t#t#t#|i:replace",
&str, &len, &pat, &pat_len, &sub, &sub_len,
&count))
return NULL;
const formatdef *f;
int size;
- if (!PyArg_ParseTuple(args, "s", &fmt))
+ if (!PyArg_ParseTuple(args, "s:calcsize", &fmt))
return NULL;
f = whichtable(&fmt);
size = calcsize(fmt, f);
int len, size, num;
PyObject *res, *v;
- if (!PyArg_ParseTuple(args, "ss#", &fmt, &start, &len))
+ if (!PyArg_ParseTuple(args, "ss#:unpack", &fmt, &start, &len))
return NULL;
f = whichtable(&fmt);
size = calcsize(fmt, f);
PyObject * self;
PyObject * args;
{
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":closelog"))
return NULL;
closelog();
Py_XDECREF(S_ident_o);
{
long mask;
long pri;
- if (!PyArg_ParseTuple(args, "l", &pri))
+ if (!PyArg_ParseTuple(args, "l:LOG_MASK", &pri))
return NULL;
mask = LOG_MASK(pri);
return PyInt_FromLong(mask);
{
long mask;
long pri;
- if (!PyArg_ParseTuple(args, "l", &pri))
+ if (!PyArg_ParseTuple(args, "l:LOG_UPTO", &pri))
return NULL;
mask = LOG_UPTO(pri);
return PyInt_FromLong(mask);
PyObject *func, *args = NULL, *keyw = NULL;
struct bootstate *boot;
- if (!PyArg_ParseTuple(fargs, "OO|O", &func, &args, &keyw))
+ if (!PyArg_ParseTuple(fargs, "OO|O:start_new_thread", &func, &args, &keyw))
return NULL;
if (!PyCallable_Check(func)) {
PyErr_SetString(PyExc_TypeError,
memset((ANY *) &buf, '\0', sizeof(buf));
- if (!PyArg_ParseTuple(args, "sO", &fmt, &tup) || !gettmarg(tup, &buf))
+ if (!PyArg_ParseTuple(args, "sO:strftime", &fmt, &tup) || !gettmarg(tup, &buf))
return NULL;
fmtlen = strlen(fmt);
char *buf;
char *s;
- if (!PyArg_ParseTuple(args, "s|s", &buf, &fmt)) {
+ if (!PyArg_ParseTuple(args, "s|s:strptime", &buf, &fmt)) {
PyErr_SetString(PyExc_ValueError, "invalid argument");
return NULL;
}
PyObject *tup;
struct tm buf;
char *p;
- if (!PyArg_ParseTuple(args, "O", &tup))
+ if (!PyArg_ParseTuple(args, "O:asctime", &tup))
return NULL;
if (!gettmarg(tup, &buf))
return NULL;
PyObject *tup;
struct tm buf;
time_t tt;
- if (!PyArg_ParseTuple(args, "O", &tup))
+ if (!PyArg_ParseTuple(args, "O:mktime", &tup))
return NULL;
tt = time(&tt);
buf = *localtime(&tt);
XxoObject *self;
PyObject *args;
{
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":demo"))
return NULL;
Py_INCREF(Py_None);
return Py_None;
{
long i, j;
long res;
- if (!PyArg_ParseTuple(args, "ll", &i, &j))
+ if (!PyArg_ParseTuple(args, "ll:foo", &i, &j))
return NULL;
res = i+j; /* XXX Do something here */
return PyInt_FromLong(res);
{
XxoObject *rv;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":new"))
return NULL;
rv = newXxoObject(args);
if ( rv == NULL )
{
PyObject *list, *item;
- if (!PyArg_ParseTuple(args, "O", &list))
+ if (!PyArg_ParseTuple(args, "O:bug", &list))
return NULL;
item = PyList_GetItem(list, 0);
{
PyObject *a;
long b;
- if (!PyArg_ParseTuple(args, "O#", &a, &b))
+ if (!PyArg_ParseTuple(args, "O#:roj", &a, &b))
return NULL;
Py_INCREF(Py_None);
return Py_None;
int length, level=Z_DEFAULT_COMPRESSION, err;
z_stream zst;
- if (!PyArg_ParseTuple(args, "s#|i", &input, &length, &level))
+ if (!PyArg_ParseTuple(args, "s#|i:compress", &input, &length, &level))
return NULL;
zst.avail_out = length + length/1000 + 12 + 1;
output=(Byte*)malloc(zst.avail_out);
int length, err;
int wsize=DEF_WBITS, r_strlen=DEFAULTALLOC;
z_stream zst;
- if (!PyArg_ParseTuple(args, "s#|ii", &input, &length, &wsize, &r_strlen))
+ if (!PyArg_ParseTuple(args, "s#|ii:decompress", &input, &length, &wsize, &r_strlen))
return NULL;
if (r_strlen <= 0)
int level=Z_DEFAULT_COMPRESSION, method=DEFLATED;
int wbits=MAX_WBITS, memLevel=DEF_MEM_LEVEL, strategy=0, err;
- if (!PyArg_ParseTuple(args, "|iiiii", &level, &method, &wbits,
+ if (!PyArg_ParseTuple(args, "|iiiii:compressobj", &level, &method, &wbits,
&memLevel, &strategy))
return NULL;
{
int wbits=DEF_WBITS, err;
compobject *self;
- if (!PyArg_ParseTuple(args, "|i", &wbits))
+ if (!PyArg_ParseTuple(args, "|i:decompressobj", &wbits))
{
return NULL;
}
Byte *input;
unsigned long start_total_out;
- if (!PyArg_ParseTuple(args, "s#", &input, &inplen))
+ if (!PyArg_ParseTuple(args, "s#:compress", &input, &inplen))
return NULL;
self->zst.avail_in = inplen;
self->zst.next_in = input;
Byte *input;
unsigned long start_total_out;
- if (!PyArg_ParseTuple(args, "s#", &input, &inplen))
+ if (!PyArg_ParseTuple(args, "s#:decompress", &input, &inplen))
return NULL;
start_total_out = self->zst.total_out;
RetVal = PyString_FromStringAndSize(NULL, DEFAULTALLOC);
int flushmode = Z_FINISH;
unsigned long start_total_out;
- if (!PyArg_ParseTuple(args, "|i", &flushmode))
+ if (!PyArg_ParseTuple(args, "|i:flush", &flushmode))
return NULL;
/* Flushing with Z_NO_FLUSH is a no-op, so there's no point in
Byte *buf;
int len;
- if (!PyArg_ParseTuple(args, "s#|l", &buf, &len, &adler32val))
+ if (!PyArg_ParseTuple(args, "s#|l:adler32", &buf, &len, &adler32val))
{
return NULL;
}
uLong crc32val=crc32(0L, Z_NULL, 0);
Byte *buf;
int len;
- if (!PyArg_ParseTuple(args, "s#|l", &buf, &len, &crc32val))
+ if (!PyArg_ParseTuple(args, "s#|l:crc32", &buf, &len, &crc32val))
{
return NULL;
}
PyObject *args;
{
Py_complex c;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":conjugate"))
return NULL;
c = ((PyComplexObject *)self)->cval;
c.imag = -c.imag;
if (f->f_fp == NULL)
return err_closed();
whence = 0;
- if (!PyArg_ParseTuple(args, "O|i", &offobj, &whence))
+ if (!PyArg_ParseTuple(args, "O|i:seek", &offobj, &whence))
return NULL;
#if !defined(HAVE_LARGEFILE_SUPPORT)
offset = PyInt_AsLong(offobj);
if (f->f_fp == NULL)
return err_closed();
newsizeobj = NULL;
- if (!PyArg_ParseTuple(args, "|O", &newsizeobj))
+ if (!PyArg_ParseTuple(args, "|O:truncate", &newsizeobj))
return NULL;
if (newsizeobj != NULL) {
#if !defined(HAVE_LARGEFILE_SUPPORT)
if (f->f_fp == NULL)
return err_closed();
- if (!PyArg_ParseTuple(args, "|l", &bytesrequested))
+ if (!PyArg_ParseTuple(args, "|l:read", &bytesrequested))
return NULL;
if (bytesrequested < 0)
buffersize = new_buffersize(f, (size_t)0);
if (f->f_fp == NULL)
return err_closed();
- if (!PyArg_ParseTuple(args, "|i", &n))
+ if (!PyArg_ParseTuple(args, "|i:readline", &n))
return NULL;
if (n == 0)
return PyString_FromString("");
if (f->f_fp == NULL)
return err_closed();
- if (!PyArg_ParseTuple(args, "|l", &sizehint))
+ if (!PyArg_ParseTuple(args, "|l:readlines", &sizehint))
return NULL;
if ((list = PyList_New(0)) == NULL)
return NULL;
n = 0;
splitcount = 0;
maxsplit = 0;
- if (!PyArg_ParseTuple(args, "|z#i", &sub, &n, &maxsplit))
+ if (!PyArg_ParseTuple(args, "|z#i:split", &sub, &n, &maxsplit))
return NULL;
if (sub == NULL)
return split_whitespace(s, len, maxsplit);
int i, slen;
PyObject *seq;
- if (!PyArg_ParseTuple(args, "O", &seq))
+ if (!PyArg_ParseTuple(args, "O:join", &seq))
return NULL;
seqlen = PySequence_Length(seq);
int len = PyString_GET_SIZE(self);
int n, i = 0, last = INT_MAX;
- if (!PyArg_ParseTuple(args, "t#|ii", &sub, &n, &i, &last))
+ if (!PyArg_ParseTuple(args, "t#|ii:find", &sub, &n, &i, &last))
return -2;
if (last > len)
int len = PyString_GET_SIZE(self), n, j;
int i = 0, last = INT_MAX;
- if (!PyArg_ParseTuple(args, "t#|ii", &sub, &n, &i, &last))
+ if (!PyArg_ParseTuple(args, "t#|ii:rfind", &sub, &n, &i, &last))
return -2;
if (last > len)
char *s = PyString_AS_STRING(self);
int len = PyString_GET_SIZE(self), i, j;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":strip"))
return NULL;
i = 0;
int i, n = PyString_GET_SIZE(self);
PyObject *new;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":lower"))
return NULL;
new = PyString_FromStringAndSize(NULL, n);
if (new == NULL)
int i, n = PyString_GET_SIZE(self);
PyObject *new;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":upper"))
return NULL;
new = PyString_FromStringAndSize(NULL, n);
if (new == NULL)
int i, n = PyString_GET_SIZE(self);
PyObject *new;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":capitalize"))
return NULL;
new = PyString_FromStringAndSize(NULL, n);
if (new == NULL)
int i = 0, last = INT_MAX;
int m, r;
- if (!PyArg_ParseTuple(args, "t#|ii", &sub, &n, &i, &last))
+ if (!PyArg_ParseTuple(args, "t#|ii:count", &sub, &n, &i, &last))
return NULL;
if (last > len)
last = len;
int i, n = PyString_GET_SIZE(self);
PyObject *new;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":swapcase"))
return NULL;
new = PyString_FromStringAndSize(NULL, n);
if (new == NULL)
PyObject *result;
int trans_table[256];
- if (!PyArg_ParseTuple(args, "t#|t#",
+ if (!PyArg_ParseTuple(args, "t#|t#:translate",
&table1, &tablen, &del_table, &dellen))
return NULL;
if (tablen != 256) {
int count = 0;
PyObject *new;
- if (!PyArg_ParseTuple(args, "t#t#|i",
+ if (!PyArg_ParseTuple(args, "t#t#|i:replace",
&pat, &pat_len, &sub, &sub_len, &count))
return NULL;
if (pat_len <= 0) {
int start = 0;
int end = -1;
- if (!PyArg_ParseTuple(args, "t#|ii", &prefix, &plen, &start, &end))
+ if (!PyArg_ParseTuple(args, "t#|ii:startswith", &prefix, &plen, &start, &end))
return NULL;
/* adopt Java semantics for index out of range. it is legal for
int end = -1;
int lower, upper;
- if (!PyArg_ParseTuple(args, "t#|ii", &suffix, &plen, &start, &end))
+ if (!PyArg_ParseTuple(args, "t#|ii:endswith", &suffix, &plen, &start, &end))
return NULL;
if (start < 0 || start > len || plen > len)
{
PyObject *d;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":globals"))
return NULL;
d = PyEval_GetGlobals();
Py_INCREF(d);
PyObject *args;
{
PyObject *s;
- if (!PyArg_ParseTuple(args, "S", &s))
+ if (!PyArg_ParseTuple(args, "S:intern", &s))
return NULL;
Py_INCREF(s);
PyString_InternInPlace(&s);
{
PyObject *d;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":locals"))
return NULL;
d = PyEval_GetLocals();
Py_INCREF(d);
static PyObject *__class__ = NULL;
int retval = 0;
- if (!PyArg_ParseTuple(args, "OO", &inst, &cls))
+ if (!PyArg_ParseTuple(args, "OO:isinstance", &inst, &cls))
return NULL;
if (PyClass_Check(cls)) {
PyObject *cls;
int retval;
- if (!PyArg_ParseTuple(args, "OO", &derived, &cls))
+ if (!PyArg_ParseTuple(args, "OO:issubclass", &derived, &cls))
return NULL;
if (!PyClass_Check(derived) || !PyClass_Check(cls)) {
{
char buf[4];
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":get_magic"))
return NULL;
buf[0] = (char) ((MAGIC >> 0) & 0xff);
buf[1] = (char) ((MAGIC >> 8) & 0xff);
PyObject *list;
struct filedescr *fdp;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":get_suffixes"))
return NULL;
list = PyList_New(0);
if (list == NULL)
{
char *name;
PyObject *path = NULL;
- if (!PyArg_ParseTuple(args, "s|O", &name, &path))
+ if (!PyArg_ParseTuple(args, "s|O:find_module", &name, &path))
return NULL;
return call_find_module(name, path);
}
char *name;
int ret;
PyObject *m;
- if (!PyArg_ParseTuple(args, "s", &name))
+ if (!PyArg_ParseTuple(args, "s:init_builtin", &name))
return NULL;
ret = init_builtin(name);
if (ret < 0)
char *name;
int ret;
PyObject *m;
- if (!PyArg_ParseTuple(args, "s", &name))
+ if (!PyArg_ParseTuple(args, "s:init_frozen", &name))
return NULL;
ret = PyImport_ImportFrozenModule(name);
if (ret < 0)
{
char *name;
- if (!PyArg_ParseTuple(args, "s", &name))
+ if (!PyArg_ParseTuple(args, "s:get_frozen_object", &name))
return NULL;
return get_frozen_object(name);
}
PyObject *args;
{
char *name;
- if (!PyArg_ParseTuple(args, "s", &name))
+ if (!PyArg_ParseTuple(args, "s:is_builtin", &name))
return NULL;
return PyInt_FromLong(is_builtin(name));
}
{
char *name;
struct _frozen *p;
- if (!PyArg_ParseTuple(args, "s", &name))
+ if (!PyArg_ParseTuple(args, "s:is_frozen", &name))
return NULL;
p = find_frozen(name);
return PyInt_FromLong((long) (p == NULL ? 0 : p->size));
PyObject *fob = NULL;
PyObject *m;
FILE *fp;
- if (!PyArg_ParseTuple(args, "ss|O!", &name, &pathname,
+ if (!PyArg_ParseTuple(args, "ss|O!:load_compiled", &name, &pathname,
&PyFile_Type, &fob))
return NULL;
fp = get_file(pathname, fob, "rb");
PyObject *fob = NULL;
PyObject *m;
FILE *fp = NULL;
- if (!PyArg_ParseTuple(args, "ss|O!", &name, &pathname,
+ if (!PyArg_ParseTuple(args, "ss|O!:load_dynamic", &name, &pathname,
&PyFile_Type, &fob))
return NULL;
if (fob) {
PyObject *fob = NULL;
PyObject *m;
FILE *fp;
- if (!PyArg_ParseTuple(args, "ss|O!", &name, &pathname,
+ if (!PyArg_ParseTuple(args, "ss|O!:load_source", &name, &pathname,
&PyFile_Type, &fob))
return NULL;
fp = get_file(pathname, fob, "r");
char *pathname;
PyObject *m;
- if (!PyArg_ParseTuple(args, "ss", &name, &pathname))
+ if (!PyArg_ParseTuple(args, "ss:load_resource", &name, &pathname))
return NULL;
m = PyMac_LoadResourceModule(name, pathname);
return m;
int type;
FILE *fp;
- if (!PyArg_ParseTuple(args, "sOs(ssi)",
+ if (!PyArg_ParseTuple(args, "sOs(ssi):load_module",
&name, &fob, &pathname,
&suffix, &mode, &type))
return NULL;
{
char *name;
char *pathname;
- if (!PyArg_ParseTuple(args, "ss", &name, &pathname))
+ if (!PyArg_ParseTuple(args, "ss:load_package", &name, &pathname))
return NULL;
return load_package(name, pathname);
}
PyObject *args;
{
char *name;
- if (!PyArg_ParseTuple(args, "s", &name))
+ if (!PyArg_ParseTuple(args, "s:new_module", &name))
return NULL;
return PyModule_New(name);
}
PyObject *args;
{
PyThreadState *tstate = PyThreadState_Get();
- if (!PyArg_ParseTuple(args, "i", &tstate->interp->checkinterval))
+ if (!PyArg_ParseTuple(args, "i:setcheckinterval", &tstate->interp->checkinterval))
return NULL;
Py_INCREF(Py_None);
return Py_None;