Re: Doxygen comment translation - C to Python using Swig
William S Fulton <[email protected]> Thu, 30 Mar 2023 19:08:03 +0100
| Newsgroups | gmane.comp.programming.swig |
|---|---|
| Message-ID | <CANGqftC7iAxeQfxCAhLG11JoanCK2fSSjrK0KMfN51be5he7xg@mail.gmail.com> |
On Tue, 28 Mar 2023 at 21:36, guhan balasubramanian <[email protected]> wrote: > Hi, > > I've recently been experimenting with using the swig interface to convert > from C to Python for my projects. One question I had with respect to the > usage is regarding doxygen comments. > > I have a C header file with appropriate doxygen comments. I'm trying to > port it to the corresponding pydoc version. I tried the following: > 1. "- doxygen" flag in swig 4.0 + autdoc feature. > 2. External utility like "https://github.com/m7thon/doxy2swig" > > I found success to some extent, but I always see that the typemaps to > modify the input/output parameters are being mis-represented in doxygen > during the translation process. > > I also noticed a page in the swig wiki, trying to address this problem > inherently in swig, but not sure if it is something in the horizon > https://github.com/swig/swig/wiki/GSoC-2008-Doxygen-Comments > > Think I'm all over the place currently. Could you please help me with the > latest information on this and with any one of the following if available: > - examples or references for existing usage. > - unofficial hacks for doxygen translation. > > SWIG is tested with lots of doxygen comment tests in Examples/test-suite/doxygen_*.i. The Python runtime tests for these are Examples/test-suite/python/doxygen_*_runme.py. Docs for latest version (4.1.1) are at https://swig.org/Doc4.1/Doxygen.html#Doxygen_to_pydoc in case you haven't found them. autodoc tests: $ grep -l autodoc Examples/test-suite/* Examples/test-suite/autodoc.i Examples/test-suite/common.mk Examples/test-suite/cpp11_null_pointer_constant.i Examples/test-suite/default_args.i Examples/test-suite/doxygen_autodoc_docstring.i Examples/test-suite/python_flatstaticmethod.i Hope that helps. William _______________________________________________ Swig-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/swig-user