Commit 9a238cb7 authored by Lisandro Dalcin's avatar Lisandro Dalcin

Fix a few warnings from system GCC 4.2.1 in OS X 10.7.3

parent 84311ceb
......@@ -811,8 +811,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
if not method_entry.is_inherited and method_entry.final_func_cname:
declaration = method_entry.type.declaration_code(
method_entry.final_func_cname)
if entry.func_modifiers:
modifiers = "%s " % ' '.join(entry.func_modifiers).upper()
if method_entry.func_modifiers:
modifiers = "%s " % ' '.join(method_entry.func_modifiers).upper()
else:
modifiers = ''
code.putln("static %s%s;" % (modifiers, declaration))
......
......@@ -4258,7 +4258,7 @@ class OverrideCheckNode(StatNode):
func_node_temp, self_arg, interned_attr_cname, err))
code.put_gotref(func_node_temp)
is_builtin_function_or_method = "PyCFunction_Check(%s)" % func_node_temp
is_overridden = "(PyCFunction_GET_FUNCTION(%s) != (void *)&%s)" % (
is_overridden = "(PyCFunction_GET_FUNCTION(%s) != (PyCFunction)%s)" % (
func_node_temp, self.py_func.entry.func_cname)
code.putln("if (!%s || %s) {" % (is_builtin_function_or_method, is_overridden))
self.body.generate_execution_code(code)
......
......@@ -161,7 +161,7 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) {
{{for type_ptr, getbuffer, releasebuffer in types}}
{{if releasebuffer}}
if (PyObject_TypeCheck(obj, {{type_ptr}})) return {{releasebuffer}}(obj, view);
if (PyObject_TypeCheck(obj, {{type_ptr}})) { {{releasebuffer}}(obj, view); return; }
{{endif}}
{{endfor}}
......
......@@ -385,10 +385,10 @@ __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
#if PY_MAJOR_VERSION >= 3
return PyUnicode_FromFormat("<cyfunction %U at %p>",
func_name, op);
func_name, (void *)op);
#else
return PyString_FromFormat("<cyfunction %s at %p>",
PyString_AsString(func_name), op);
PyString_AsString(func_name), (void *)op);
#endif
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment