From: Barry Warsaw <barry@ubuntu.com>
Date: Fri, 1 Jul 2011 18:54:55 +0200
Subject: Wrap PyEval_CallObject

PyEval_CallObject became a macro in Python 2.7, so it needs a wrapper
to compile properly.

Bug-Ubuntu: http://bugs.launchpad.net/ubuntu/+source/pycaml/+bug/688862
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632329
Signed-off-by: Stephane Glondu <steph@glondu.net>
---
 pycaml_ml.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/pycaml_ml.c b/pycaml_ml.c
index 3557869..59b30ed 100644
--- a/pycaml_ml.c
+++ b/pycaml_ml.c
@@ -920,6 +920,9 @@ PyObject * wrap_Py_CompileString(const char *str, const char *p, int s) {
 PyObject *wrap_PyImport_ImportModuleEx(char *name, PyObject *globals, PyObject *locals, PyObject *fromlist) {
   return PyImport_ImportModuleEx(name, globals, locals, fromlist);
 }
+PyObject *wrap_PyEval_CallObject(PyObject *func, PyObject *arg) {
+  return PyEval_CallObject(func, arg);
+}
 
 
 /* Create the function table */
@@ -1165,7 +1168,7 @@ python_func_table the_python_func_table[] = {
 /* 42 */
 { (void *)PyEval_CallObjectWithKeywords, 42, "PyEval_CallObjectWithKeywords" },
 /* 17 */
-{ (void *)PyEval_CallObject, 17, "PyEval_CallObject" },
+{ (void *)wrap_PyEval_CallObject, 17, "PyEval_CallObject" },
 
 /* 29 */
 { (void *)PyEval_GetBuiltins, 29, "PyEval_GetBuiltins" },
-- 
