inquiry func = (inquiry)wrapped;
int res;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_UnpackTuple(args, "", 0, 0))
return NULL;
res = (*func)(self);
if (res == -1 && PyErr_Occurred())
inquiry func = (inquiry)wrapped;
int res;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_UnpackTuple(args, "", 0, 0))
return NULL;
res = (*func)(self);
if (res == -1 && PyErr_Occurred())
binaryfunc func = (binaryfunc)wrapped;
PyObject *other;
- if (!PyArg_ParseTuple(args, "O", &other))
+ if (!PyArg_UnpackTuple(args, "", 1, 1, &other))
return NULL;
return (*func)(self, other);
}
binaryfunc func = (binaryfunc)wrapped;
PyObject *other;
- if (!PyArg_ParseTuple(args, "O", &other))
+ if (!PyArg_UnpackTuple(args, "", 1, 1, &other))
return NULL;
if (!(self->ob_type->tp_flags & Py_TPFLAGS_CHECKTYPES) &&
!PyType_IsSubtype(other->ob_type, self->ob_type)) {
binaryfunc func = (binaryfunc)wrapped;
PyObject *other;
- if (!PyArg_ParseTuple(args, "O", &other))
+ if (!PyArg_UnpackTuple(args, "", 1, 1, &other))
return NULL;
if (!(self->ob_type->tp_flags & Py_TPFLAGS_CHECKTYPES) &&
!PyType_IsSubtype(other->ob_type, self->ob_type)) {
PyObject *other, *res;
int ok;
- if (!PyArg_ParseTuple(args, "O", &other))
+ if (!PyArg_UnpackTuple(args, "", 1, 1, &other))
return NULL;
ok = func(&self, &other);
if (ok < 0)
/* Note: This wrapper only works for __pow__() */
- if (!PyArg_ParseTuple(args, "O|O", &other, &third))
+ if (!PyArg_UnpackTuple(args, "", 1, 2, &other, &third))
return NULL;
return (*func)(self, other, third);
}
/* Note: This wrapper only works for __pow__() */
- if (!PyArg_ParseTuple(args, "O|O", &other, &third))
+ if (!PyArg_UnpackTuple(args, "", 1, 2, &other, &third))
return NULL;
return (*func)(other, self, third);
}
{
unaryfunc func = (unaryfunc)wrapped;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_UnpackTuple(args, "", 0, 0))
return NULL;
return (*func)(self);
}
return NULL;
return (*func)(self, i);
}
- PyArg_ParseTuple(args, "O", &arg);
+ PyArg_UnpackTuple(args, "", 1, 1, &arg);
assert(PyErr_Occurred());
return NULL;
}
int i, res;
PyObject *arg, *value;
- if (!PyArg_ParseTuple(args, "OO", &arg, &value))
+ if (!PyArg_UnpackTuple(args, "", 2, 2, &arg, &value))
return NULL;
i = getindex(self, arg);
if (i == -1 && PyErr_Occurred())
int i, res;
PyObject *arg;
- if (!PyArg_ParseTuple(args, "O", &arg))
+ if (!PyArg_UnpackTuple(args, "", 1, 1, &arg))
return NULL;
i = getindex(self, arg);
if (i == -1 && PyErr_Occurred())
int res;
PyObject *value;
- if (!PyArg_ParseTuple(args, "O", &value))
+ if (!PyArg_UnpackTuple(args, "", 1, 1, &value))
return NULL;
res = (*func)(self, value);
if (res == -1 && PyErr_Occurred())
int res;
PyObject *key, *value;
- if (!PyArg_ParseTuple(args, "OO", &key, &value))
+ if (!PyArg_UnpackTuple(args, "", 2, 2, &key, &value))
return NULL;
res = (*func)(self, key, value);
if (res == -1 && PyErr_Occurred())
int res;
PyObject *key;
- if (!PyArg_ParseTuple(args, "O", &key))
+ if (!PyArg_UnpackTuple(args, "", 1, 1, &key))
return NULL;
res = (*func)(self, key, NULL);
if (res == -1 && PyErr_Occurred())
int res;
PyObject *other;
- if (!PyArg_ParseTuple(args, "O", &other))
+ if (!PyArg_UnpackTuple(args, "", 1, 1, &other))
return NULL;
if (other->ob_type->tp_compare != func &&
!PyType_IsSubtype(other->ob_type, self->ob_type)) {
int res;
PyObject *name, *value;
- if (!PyArg_ParseTuple(args, "OO", &name, &value))
+ if (!PyArg_UnpackTuple(args, "", 2, 2, &name, &value))
return NULL;
if (!hackcheck(self, func, "__setattr__"))
return NULL;
int res;
PyObject *name;
- if (!PyArg_ParseTuple(args, "O", &name))
+ if (!PyArg_UnpackTuple(args, "", 1, 1, &name))
return NULL;
if (!hackcheck(self, func, "__delattr__"))
return NULL;
hashfunc func = (hashfunc)wrapped;
long res;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_UnpackTuple(args, "", 0, 0))
return NULL;
res = (*func)(self);
if (res == -1 && PyErr_Occurred())
richcmpfunc func = (richcmpfunc)wrapped;
PyObject *other;
- if (!PyArg_ParseTuple(args, "O", &other))
+ if (!PyArg_UnpackTuple(args, "", 1, 1, &other))
return NULL;
return (*func)(self, other, op);
}
unaryfunc func = (unaryfunc)wrapped;
PyObject *res;
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_UnpackTuple(args, "", 0, 0))
return NULL;
res = (*func)(self);
if (res == NULL && !PyErr_Occurred())
PyObject *obj;
PyObject *type = NULL;
- if (!PyArg_ParseTuple(args, "O|O", &obj, &type))
+ if (!PyArg_UnpackTuple(args, "", 1, 2, &obj, &type))
return NULL;
if (obj == Py_None)
obj = NULL;
PyObject *obj, *value;
int ret;
- if (!PyArg_ParseTuple(args, "OO", &obj, &value))
+ if (!PyArg_UnpackTuple(args, "", 2, 2, &obj, &value))
return NULL;
ret = (*func)(self, obj, value);
if (ret < 0)
PyObject *obj;
int ret;
- if (!PyArg_ParseTuple(args, "O", &obj))
+ if (!PyArg_UnpackTuple(args, "", 1, 1, &obj))
return NULL;
ret = (*func)(self, obj, NULL);
if (ret < 0)