args = self.declarator.args,
star_arg = None,
starstar_arg = None,
- doc = None, # self.doc,
+ doc = self.doc,
body = py_func_body)
self.py_func.analyse_declarations(env)
# Reset scope entry the above cfunction
Naming.pymethdef_prefix + prefix + name
if not Options.docstrings:
self.entry.doc = None
- elif not entry.is_special:
+ else:
if Options.embed_pos_in_docstring:
entry.doc = 'File: %s (starting at line %s)'%relative_position(self.pos)
if not self.doc is None:
if s.sy == ':':
if level not in ('module', 'c_class'):
s.error("C function definition not allowed here")
- suite = p_suite(s, 'function', with_pseudo_doc = 1)
+ doc, suite = p_suite(s, 'function', with_doc = 1)
result = Nodes.CFuncDefNode(pos,
visibility = visibility,
base_type = base_type,
declarator = declarator,
body = suite,
+ doc = doc,
modifiers = modifiers,
api = api,
overridable = overridable)