FIx python3 compatibility.
authorJelmer Vernooij <jelmer@jelmer.uk>
Fri, 4 Aug 2017 21:12:47 +0000 (21:12 +0000)
committerJelmer Vernooij <jelmer@jelmer.uk>
Fri, 4 Aug 2017 21:12:47 +0000 (21:12 +0000)
subvertpy/wc.c

index 09dfb1340fd1b7fc14aeae2649ffe5818816f032..6b40f62ce7c4163508f5c3d40f95d5c0699f7ba8 100644 (file)
@@ -1041,7 +1041,11 @@ static PyObject *py_wc_context_check_wc(PyObject *self, PyObject *args)
 
     apr_pool_destroy(pool);
 
+#if PY_MAJOR_VERSION >= 3
+    return PyLong_FromLong(wc_format);
+#else
     return PyInt_FromLong(wc_format);
+#endif
 }
 
 static PyObject *py_wc_context_text_modified_p2(PyObject *self, PyObject *args)