'Ensure a prototype for every @cname method in the right place'

def generate_function_definitions(self, env, code):

    if (self.is_function and env.is_c_class_scope):
        h_code = code.globalstate['utility_code_proto']
        if isinstance(self.node, DefNode):
            self.node.generate_function_header(h_code, with_pymethdef=False, proto_only=True)
        else:
            from . import ModuleNode
            entry = self.node.entry
            cname = entry.cname
            entry.cname = entry.func_cname
            ModuleNode.generate_cfunction_declaration(entry, env.global_scope(), h_code, definition=True)
            entry.cname = cname
    self.node.generate_function_definitions(env, code)
