From 4838586bbbce1491618832952e7f19a5dcde14e3 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Mon, 13 Sep 2010 18:07:33 +0400 Subject: [PATCH] Fix for old python 2.4 Signed-off-by: Peter Lemenkov --- apps/ivr/Ivr.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/ivr/Ivr.cpp b/apps/ivr/Ivr.cpp index 0cb9b540..89f31b33 100644 --- a/apps/ivr/Ivr.cpp +++ b/apps/ivr/Ivr.cpp @@ -210,7 +210,11 @@ void IvrFactory::import_object(PyObject* m, const char* name, PyTypeObject* type return; } Py_INCREF(type); +#if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 5 + PyModule_AddObject(m, (char*)name, (PyObject *)type); +#else PyModule_AddObject(m, name, (PyObject *)type); +#endif } void IvrFactory::import_ivr_builtins()