Hilko Bengen
2012-Sep-20 17:36 UTC
[Libguestfs] [PATCH] python: PyInt_* no longer exists in python3, replace with PyLong_*
---
generator/python.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/generator/python.ml b/generator/python.ml
index 482b189..b4bc3ce 100644
--- a/generator/python.ml
+++ b/generator/python.ml
@@ -381,7 +381,7 @@ free_strings (char **argv)
pr " optargs_s.bitmask |= %s_%s_BITMASK;\n"
c_optarg_prefix uc_n;
(match optarg with
| OBool _ | OInt _ ->
- pr " optargs_s.%s = PyInt_AsLong (py_%s);\n" n n;
+ pr " optargs_s.%s = PyLong_AsLong (py_%s);\n" n n;
pr " if (PyErr_Occurred ()) return NULL;\n"
| OInt64 _ ->
pr " optargs_s.%s = PyLong_AsLongLong (py_%s);\n" n
n;
--
1.7.10.4
Apparently Analagous Threads
- [PATCH] generator: Share Common_utils code.
- [PATCH] python: fix possible free on uninit memory with OStringList optargs
- [PATCH] python: add simple wrappers for PyObject<->string functions
- [PATCH v2] python: add simple wrappers for PyObject<->string functions
- [PATCH 4/4] php: fix memory leak in OStringList optargs
