From 19cf712cbf1abe4534351ac857180695b83a294a Mon Sep 17 00:00:00 2001 From: Lisandro Dalcin Date: Mon, 16 Aug 2010 15:47:34 -0300 Subject: [PATCH] silent GCC warnings with Py<2.5 --- Cython/Compiler/ExprNodes.py | 2 +- Cython/Compiler/ModuleNode.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 87f04ee4..c635d668 100755 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -7518,7 +7518,7 @@ static PyObject *%(binding_cfunc)s_descr_get(PyObject *func, PyObject *obj, PyOb int %(binding_cfunc)s_init(void) { %(binding_cfunc)s_type = PyCFunction_Type; - %(binding_cfunc)s_type.tp_name = "cython_binding_builtin_function_or_method"; + %(binding_cfunc)s_type.tp_name = __Pyx_NAMESTR("cython_binding_builtin_function_or_method"); %(binding_cfunc)s_type.tp_dealloc = (destructor)%(binding_cfunc)s_dealloc; %(binding_cfunc)s_type.tp_descr_get = %(binding_cfunc)s_descr_get; if (PyType_Ready(&%(binding_cfunc)s_type) < 0) { diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 204dd8e3..f143a62e 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -2048,7 +2048,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): if func.is_special and func.wrapperbase_cname: code.putln("{"); code.putln( - 'PyObject *wrapper = PyObject_GetAttrString((PyObject *)&%s, "%s"); %s' % ( + 'PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&%s, "%s"); %s' % ( typeobj_cname, func.name, code.error_goto_if_null('wrapper', entry.pos))); -- 2.26.2