diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2011-03-09 16:08:59 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2011-03-09 16:08:59 +0200 |
commit | cb61d8a89c70c1771947c10984eeab2141133bd4 (patch) | |
tree | e31dfb42a16f50825b2e19ea24a0a10e92409e27 /python | |
parent | 16aea81dc77fece89766065d70dcff3ce9a640a7 (diff) | |
download | rpm-cb61d8a89c70c1771947c10984eeab2141133bd4.tar.gz rpm-cb61d8a89c70c1771947c10984eeab2141133bd4.tar.bz2 rpm-cb61d8a89c70c1771947c10984eeab2141133bd4.zip |
Python 3 fixups
- PyString is gone, use PyBytes instead
- Add compatibility defines to paper over
PyInt/PyLong_JustHowLongFunctionNamesYouCanComeUpWith()
Diffstat (limited to 'python')
-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 */ |