Commit 60ceabc8 authored by Stefan Behnel's avatar Stefan Behnel

Remove incorrect function pointer cast again: METH_NOARGS actually takes a second argument.

parent 40c04382
...@@ -2196,12 +2196,9 @@ class CCodeWriter(object): ...@@ -2196,12 +2196,9 @@ class CCodeWriter(object):
method_flags += [method_coexist] method_flags += [method_coexist]
func_ptr = entry.func_cname func_ptr = entry.func_cname
# Add required casts, but try not to shadow real warnings. # Add required casts, but try not to shadow real warnings.
if 'METH_NOARGS' in method_flags: cast = '__Pyx_PyCFunctionFast' if 'METH_FASTCALL' in method_flags else 'PyCFunction'
cast = 'PyNoArgsFunction' if 'METH_KEYWORDS' in method_flags:
else: cast += 'WithKeywords'
cast = '__Pyx_PyCFunctionFast' if 'METH_FASTCALL' in method_flags else 'PyCFunction'
if 'METH_KEYWORDS' in method_flags:
cast += 'WithKeywords'
if cast != 'PyCFunction': if cast != 'PyCFunction':
func_ptr = '(void*)(%s)%s' % (cast, func_ptr) func_ptr = '(void*)(%s)%s' % (cast, func_ptr)
self.putln( self.putln(
......
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