From ac6b51f13e02dc137f639c6465d227eee7442e08 Mon Sep 17 00:00:00 2001 From: Dmitry Kabak Date: Mon, 4 Jun 2012 18:02:51 +0000 Subject: [PATCH] Fix to include comment for non-member functions in python git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-doxygen@13149 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/Modules/python.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx index c47f695aa..f0f6d0671 100644 --- a/Source/Modules/python.cxx +++ b/Source/Modules/python.cxx @@ -1780,6 +1780,13 @@ public: String *callParms = make_pyParmList(n, false, true, kw); /* Make a wrapper function to insert the code into */ Printv(f_dest, "\ndef ", name, "(", parms, ")", returnTypeAnnotation(n), ":\n", NIL); + if (doxygen) { + String *doxygen_comments; + if (DoxygenTranslator::getDocumentation(n, PyDoc, doxygen_comments)) { + Printf(f_dest, Char(pythoncode(doxygen_comments, tab2))); + Delete(doxygen_comments); + } + } if (have_docstring(n)) Printv(f_dest, " ", docstring(n, AUTODOC_FUNC, tab4), "\n", NIL); if (have_pythonprepend(n))