"\"%s\" must be an integer", name);
return -1;
}
- value = _PyLong_AsInt(src);
+ value = PyLong_AsInt(src);
if (value == -1 && PyErr_Occurred()) {
return -1;
}
return -1;
}
if (tmp) {
- pack = _PyLong_AsInt(tmp);
+ pack = PyLong_AsInt(tmp);
Py_DECREF(tmp);
if (pack < 0) {
if (!PyErr_Occurred() ||
}
num = PyTuple_GET_ITEM(tuple, 1); /* us */
- us = _PyLong_AsInt(num);
+ us = PyLong_AsInt(num);
num = NULL;
if (us == -1 && PyErr_Occurred()) {
goto Done;
Py_DECREF(num);
num = PyTuple_GET_ITEM(tuple, 1); /* seconds */
- s = _PyLong_AsInt(num);
+ s = PyLong_AsInt(num);
num = NULL;
if (s == -1 && PyErr_Occurred()) {
goto Done;
}
num = Py_NewRef(PyTuple_GET_ITEM(tuple, 0)); /* leftover days */
- d = _PyLong_AsInt(num);
+ d = PyLong_AsInt(num);
if (d == -1 && PyErr_Occurred()) {
goto Done;
}
self->fd = -1;
}
- fd = _PyLong_AsInt(nameobj);
+ fd = PyLong_AsInt(nameobj);
if (fd < 0) {
if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_ValueError,
goto error;
}
- self->fd = _PyLong_AsInt(fdobj);
+ self->fd = PyLong_AsInt(fdobj);
Py_DECREF(fdobj);
if (self->fd < 0) {
if (!PyErr_Occurred()) {
self->fd = -1;
}
- fd = _PyLong_AsInt(nameobj);
+ fd = PyLong_AsInt(nameobj);
if (fd < 0) {
if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_ValueError,
}
else {
if (PyLong_Check(ret)) {
- rc = _PyLong_AsInt(ret);
+ rc = PyLong_AsInt(ret);
if (rc == -1 && PyErr_Occurred()) {
print_or_clear_traceback(ctx);
rc = SQLITE_DENY;
}
}
else if (PyLong_Check(file)) {
- fd = _PyLong_AsInt(file);
+ fd = PyLong_AsInt(file);
if (fd == -1 && PyErr_Occurred())
return -1;
if (fd < 0) {
goto fail;
}
if (py_schedpolicy != Py_None) {
- int schedpolicy = _PyLong_AsInt(py_schedpolicy);
+ int schedpolicy = PyLong_AsInt(py_schedpolicy);
if (schedpolicy == -1 && PyErr_Occurred()) {
goto fail;
size_t tablesize)
{
if (PyLong_Check(arg)) {
- int value = _PyLong_AsInt(arg);
+ int value = PyLong_AsInt(arg);
if (value == -1 && PyErr_Occurred())
return 0;
*valuep = value;
/*[clinic end generated code: output=db50b1b0ba3c7153 input=7fe2d7fdaea3db42]*/
{
#ifndef MS_WINDOWS
- int status = _PyLong_AsInt(status_obj);
+ int status = PyLong_AsInt(status_obj);
if (status == -1 && PyErr_Occurred()) {
return NULL;
}
if (r == Py_None)
result = 0;
else {
- result = _PyLong_AsInt(r);
+ result = PyLong_AsInt(r);
if (result == -1 && PyErr_Occurred())
goto error;
}
/* op is a required, keyword-only argument >= 0 */
if (opobj != NULL) {
- op = _PyLong_AsInt(opobj);
+ op = PyLong_AsInt(opobj);
}
if (op < 0) {
- /* override exception from _PyLong_AsInt() */
+ /* override exception from PyLong_AsInt() */
PyErr_SetString(PyExc_TypeError,
"Invalid or missing argument 'op'");
goto finally;
}
/* assoclen is optional but must be >= 0 */
if (assoclenobj != NULL) {
- assoclen = _PyLong_AsInt(assoclenobj);
+ assoclen = PyLong_AsInt(assoclenobj);
if (assoclen == -1 && PyErr_Occurred()) {
goto finally;
}
int how;
int res;
- how = _PyLong_AsInt(arg);
+ how = PyLong_AsInt(arg);
if (how == -1 && PyErr_Occurred())
return NULL;
Py_BEGIN_ALLOW_THREADS
"* wants int");
goto error;
}
- prec = _PyLong_AsInt(v);
+ prec = PyLong_AsInt(v);
if (prec == -1 && PyErr_Occurred())
goto error;
if (prec < 0)
PyObject *meth;
if (PyLong_Check(o)) {
- fd = _PyLong_AsInt(o);
+ fd = PyLong_AsInt(o);
}
else if (PyObject_GetOptionalAttr(o, &_Py_ID(fileno), &meth) < 0) {
return -1;
return -1;
if (PyLong_Check(fno)) {
- fd = _PyLong_AsInt(fno);
+ fd = PyLong_AsInt(fno);
Py_DECREF(fno);
}
else {
"* wants int");
return -1;
}
- arg->prec = _PyLong_AsInt(v);
+ arg->prec = PyLong_AsInt(v);
if (arg->prec == -1 && PyErr_Occurred())
return -1;
if (arg->prec < 0)
PyObject *k, *v;
Py_ssize_t pos = 0;
while (PyDict_Next(umd->u_varnames, &pos, &k, &v)) {
- int offset = _PyLong_AsInt(v);
+ int offset = PyLong_AsInt(v);
if (offset == -1 && PyErr_Occurred()) {
return ERROR;
}
continue;
}
- int offset = _PyLong_AsInt(v);
+ int offset = PyLong_AsInt(v);
if (offset == -1 && PyErr_Occurred()) {
return ERROR;
}
pos = 0;
while (PyDict_Next(umd->u_freevars, &pos, &k, &v)) {
- int offset = _PyLong_AsInt(v);
+ int offset = PyLong_AsInt(v);
if (offset == -1 && PyErr_Occurred()) {
return ERROR;
}
/* Fast path for not overloaded __import__. */
if (_PyImport_IsDefaultImportFunc(tstate->interp, import_func)) {
- int ilevel = _PyLong_AsInt(level);
+ int ilevel = PyLong_AsInt(level);
if (ilevel == -1 && _PyErr_Occurred(tstate)) {
return NULL;
}
continue;
}
- int argoffset = _PyLong_AsInt(varindex);
+ int argoffset = PyLong_AsInt(varindex);
Py_DECREF(varindex);
if (argoffset == -1 && PyErr_Occurred()) {
goto error;
}
- int oldindex = _PyLong_AsInt(cellindex);
+ int oldindex = PyLong_AsInt(cellindex);
if (oldindex == -1 && PyErr_Occurred()) {
goto error;
}
if (item == NULL) {
return -1;
}
- int value = _PyLong_AsInt(item);
+ int value = PyLong_AsInt(item);
Py_DECREF(item);
if (value == -1 && PyErr_Occurred()) {
if (PyErr_ExceptionMatches(PyExc_TypeError)) {
Py_RETURN_NONE;
}
assert(PyVectorcall_NARGS(nargsf) == 2);
- int line = _PyLong_AsInt(args[1]);
+ int line = PyLong_AsInt(args[1]);
assert(line >= 0);
PyFrameObject *frame = PyEval_GetFrame();
if (frame == NULL) {
Py_RETURN_NONE;
}
assert(PyVectorcall_NARGS(nargsf) == 3);
- int from = _PyLong_AsInt(args[1])/sizeof(_Py_CODEUNIT);
+ int from = PyLong_AsInt(args[1])/sizeof(_Py_CODEUNIT);
assert(from >= 0);
- int to = _PyLong_AsInt(args[2])/sizeof(_Py_CODEUNIT);
+ int to = PyLong_AsInt(args[2])/sizeof(_Py_CODEUNIT);
assert(to >= 0);
if (to > from) {
/* Forward jump */