diff options
-rw-r--r-- | python/rpmii-py.c | 2 | ||||
-rw-r--r-- | python/rpmsystem-py.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/python/rpmii-py.c b/python/rpmii-py.c index ae74c94e7..51d74e824 100644 --- a/python/rpmii-py.c +++ b/python/rpmii-py.c @@ -47,7 +47,7 @@ rpmii_iternext(rpmiiObject * s) s->ii = rpmdbIndexIteratorFree(s->ii); return NULL; } - return PyString_FromStringAndSize(key, keylen); + return PyBytes_FromStringAndSize(key, keylen); }; static PyObject * diff --git a/python/rpmsystem-py.h b/python/rpmsystem-py.h index 3d88b3dbe..eb42dd33f 100644 --- a/python/rpmsystem-py.h +++ b/python/rpmsystem-py.h @@ -36,6 +36,8 @@ typedef Py_ssize_t (*lenfunc)(PyObject *); #define PyInt_Check PyLong_Check #define PyInt_AsLong PyLong_AsLong #define PyInt_FromLong PyLong_FromLong +#define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask +#define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #endif #endif /* H_SYSTEM_PYTHON */ |