1

I have some C API that contains docs such as

 // file: my_module.h

 /**
  * My function.
  * @param x A number.
  * @return Return.
  */
extern int my_function(int x);

My swig file

%module my_module
%{
#include "my_module.h"
%}

%include "my_module.h"  

If I generate a wrapper for python for example, I will get this python wrapper function generated

 # file: my_module.py

 # < I want my docs copied here
 def my_function(x):
    return _my_module.my_function(x)

Is there a way to tell SWIG to copy my docs to the output so that when I use the wrapper, I can see my docs in the python editor's intellisense?

aganm
  • 1,245
  • 1
  • 11
  • 30

1 Answers1

0

I haven't tried it out myself, but SWIG 4.0 has some support for doxygen comments:

http://www.swig.org/Doc4.0/SWIGDocumentation.html#Doxygen

Mark Tolonen
  • 166,664
  • 26
  • 169
  • 251