Commit 96957116 authored by Stefan Behnel's avatar Stefan Behnel

comments

parent 1792fbdf
...@@ -2603,10 +2603,12 @@ class DefNode(FuncDefNode): ...@@ -2603,10 +2603,12 @@ class DefNode(FuncDefNode):
code.putln("Py_ssize_t kw_args = PyDict_Size(%s);" % code.putln("Py_ssize_t kw_args = PyDict_Size(%s);" %
Naming.kwds_cname) Naming.kwds_cname)
# it looks funny to separate the init-to-0 from setting the # the 'values' array collects borrowed references to arguments
# default value, but C89 needs this # before doing any type coercion etc.
code.putln("PyObject* values[%d] = {%s};" % ( code.putln("PyObject* values[%d] = {%s};" % (
max_args, ','.join('0'*max_args))) max_args, ','.join('0'*max_args)))
# it looks funny to separate the init-to-0 from setting the
# default value, but C89 needs this
for i, default_value in default_args: for i, default_value in default_args:
code.putln('values[%d] = %s;' % (i, default_value)) code.putln('values[%d] = %s;' % (i, default_value))
......
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