#if PY_MAJOR_VERSION >= 3
#define PyInt_FromLong PyLong_FromLong
-#define PyInt_Check PyLong_Check
#define PyInt_AsLong PyLong_AsLong
#define Py_TPFLAGS_HAVE_ITER 0
#endif
static int obj_set_max_dead(PyTdbObject *self, PyObject *max_dead, void *closure)
{
PyErr_TDB_RAISE_RETURN_MINUS_1_IF_CLOSED(self);
- if (!PyInt_Check(max_dead))
+ if (!PyLong_Check(max_dead))
return -1;
tdb_set_max_dead(self->ctx, PyInt_AsLong(max_dead));
return 0;
if (PyTuple_Size(obj) == 1) {
*dest_port = NBT_NAME_SERVICE_PORT;
return true;
- } else if (PyInt_Check(PyTuple_GetItem(obj, 1))) {
+ } else if (PyLong_Check(PyTuple_GetItem(obj, 1))) {
*dest_port = PyInt_AsLong(PyTuple_GetItem(obj, 1));
return true;
} else {
$self->pidl("}");
$self->pidl("$target = test_var;");
$self->deindent;
- $self->pidl("} else if (PyInt_Check($cvar)) {");
+ $self->pidl("} else if (PyLong_Check($cvar)) {");
$self->indent;
$self->pidl("long test_var;");
$self->pidl("test_var = PyInt_AsLong($cvar);");
$self->pidl("}");
$self->pidl("$target = test_var;");
$self->deindent;
- $self->pidl("} else if (PyInt_Check($cvar)) {");
+ $self->pidl("} else if (PyLong_Check($cvar)) {");
$self->indent;
$self->pidl("long test_var;");
$self->pidl("test_var = PyInt_AsLong($cvar);");
/* Ints */
#define PyInt_Type PyLong_Type
-#define PyInt_Check PyLong_Check
#define PyInt_FromLong PyLong_FromLong
#define PyInt_AsLong PyLong_AsLong
%typemap(in, numinputs=1) (uint32_t uCount, struct WbemClassObject **apObjects, uint32_t *puReturned) (uint32_t uReturned) {
if (PyLong_Check($input))
$1 = PyLong_AsUnsignedLong($input);
- else if (PyInt_Check($input))
+ else if (PyLong_Check($input))
$1 = PyInt_AsLong($input);
else {
PyErr_SetString(PyExc_TypeError,"Expected a long or an int");
if (PyFloat_Check(obj)) {
if (val) *val = PyFloat_AsDouble(obj);
return SWIG_OK;
- } else if (PyInt_Check(obj)) {
+ } else if (PyLong_Check(obj)) {
if (val) *val = PyInt_AsLong(obj);
return SWIG_OK;
} else if (PyLong_Check(obj)) {
SWIGINTERN int
SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val)
{
- if (PyInt_Check(obj)) {
+ if (PyLong_Check(obj)) {
long v = PyInt_AsLong(obj);
if (v >= 0) {
if (val) *val = v;
SWIGINTERN int
SWIG_AsVal_long (PyObject *obj, long* val)
{
- if (PyInt_Check(obj)) {
+ if (PyLong_Check(obj)) {
if (val) *val = PyInt_AsLong(obj);
return SWIG_OK;
} else if (PyLong_Check(obj)) {
{
if (PyLong_Check(obj2))
arg4 = PyLong_AsUnsignedLong(obj2);
- else if (PyInt_Check(obj2))
+ else if (PyLong_Check(obj2))
arg4 = PyInt_AsLong(obj2);
else {
PyErr_SetString(PyExc_TypeError,"Expected a long or an int");
}
item = PyTuple_GetItem(object, 1);
- if (!PyInt_Check(item)) {
+ if (!PyLong_Check(item)) {
PyErr_SetString(PyExc_ValueError, "Expected version as second element in tuple");
return false;
}