summaryrefslogtreecommitdiffstats
path: root/python/guestfs-py-byhand.c
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-11-02 19:43:53 +0000
committerRichard W.M. Jones <rjones@redhat.com>2011-11-09 22:05:51 +0000
commita31bebe46fbf4fde1ab4f39ae349a6e9497fb706 (patch)
tree2e9209817817ddca25421d1ff87de8858879e196 /python/guestfs-py-byhand.c
parenta936a9e1ed1fb89c6a9e05be70614337e9f62ca9 (diff)
downloadlibguestfs-a31bebe46fbf4fde1ab4f39ae349a6e9497fb706.tar.gz
libguestfs-a31bebe46fbf4fde1ab4f39ae349a6e9497fb706.tar.xz
libguestfs-a31bebe46fbf4fde1ab4f39ae349a6e9497fb706.zip
python: Fixes for Python 3 (RHBZ#750889).
These fixes allow libguestfs bindings to work with Python 3 (tested with Python 3.2) You can select which Python you compile against by doing: PYTHON=python ./configure && make && make check or: PYTHON=python3 ./configure && make && make check (cherry picked from commit 2116f79cbcd4605b4997931285f14dde1f72a992)
Diffstat (limited to 'python/guestfs-py-byhand.c')
-rw-r--r--python/guestfs-py-byhand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/guestfs-py-byhand.c b/python/guestfs-py-byhand.c
index 29be83b7..1756963a 100644
--- a/python/guestfs-py-byhand.c
+++ b/python/guestfs-py-byhand.c
@@ -168,7 +168,7 @@ py_guestfs_set_event_callback (PyObject *self, PyObject *args)
snprintf (key, sizeof key, "_python_event_%d", eh);
guestfs_set_private (g, key, py_callback);
- py_eh = PyInt_FromLong ((long) eh);
+ py_eh = PyLong_FromLong ((long) eh);
return py_eh;
}