Fix display of documented template types when using the autodoc feature for Python.
This commit is contained in:
parent
251d25346d
commit
7be6c10d4a
4 changed files with 35 additions and 5 deletions
|
|
@ -133,6 +133,14 @@ typedef int Integer;
|
|||
void banana(S *a, const struct tagS *b, int c, Integer d) {}
|
||||
%}
|
||||
|
||||
// Check docs for a template type
|
||||
%inline %{
|
||||
template<typename X> struct T {
|
||||
T inout(T t) { return t; }
|
||||
};
|
||||
%}
|
||||
%template(TInteger) T<int>;
|
||||
|
||||
%inline %{
|
||||
#ifdef SWIGPYTHON_BUILTIN
|
||||
bool is_python_builtin() { return true; }
|
||||
|
|
@ -140,4 +148,3 @@ bool is_python_builtin() { return true; }
|
|||
bool is_python_builtin() { return false; }
|
||||
#endif
|
||||
%}
|
||||
|
||||
|
|
|
|||
|
|
@ -365,3 +365,9 @@ check(func_output.__doc__, "func_output() -> int")
|
|||
check(func_inout.__doc__, "func_inout(int * INOUT) -> int")
|
||||
check(func_cb.__doc__, "func_cb(int c, int d) -> int")
|
||||
check(banana.__doc__, "banana(S a, S b, int c, Integer d)")
|
||||
|
||||
check(TInteger.__doc__, "Proxy of C++ T< int > class.", "::T< int >")
|
||||
check(TInteger.__init__.__doc__, "__init__(TInteger self) -> TInteger", None, skip)
|
||||
check(TInteger.inout.__doc__,
|
||||
"inout(TInteger self, TInteger t) -> TInteger",
|
||||
"inout(TInteger t) -> TInteger")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue