From: <wsf...@us...> - 2011-06-03 06:07:53
|
Revision: 12728 http://swig.svn.sourceforge.net/swig/?rev=12728&view=rev Author: wsfulton Date: 2011-06-03 06:07:46 +0000 (Fri, 03 Jun 2011) Log Message: ----------- rename python_autodoc testcase to autodoc for use with all languages (note it was once called autodoc.i in the python subdirectory) Modified Paths: -------------- trunk/Examples/test-suite/common.mk trunk/Examples/test-suite/python/Makefile.in Added Paths: ----------- trunk/Examples/test-suite/autodoc.i Removed Paths: ------------- trunk/Examples/test-suite/python_autodoc.i Copied: trunk/Examples/test-suite/autodoc.i (from rev 12719, trunk/Examples/test-suite/python_autodoc.i) =================================================================== --- trunk/Examples/test-suite/autodoc.i (rev 0) +++ trunk/Examples/test-suite/autodoc.i 2011-06-03 06:07:46 UTC (rev 12728) @@ -0,0 +1,95 @@ +%module(docstring="hello") python_autodoc + +%feature("autodoc"); + +// especial typemap and its docs +%typemap(in) (int c, int d) "$1 =0; $2 = 0;"; +%typemap(doc,name="hello",type="Tuple") (int c, int d) "hello: int tuple[2]"; + +// testing for different documentation levels +%feature("autodoc","0") A::func0; // names +%feature("autodoc","1") A::func1; // names + types +%feature("autodoc","2") A::func2; // extended +%feature("autodoc","3") A::func3; // extended + types + +%feature("autodoc","just a string") A::func; // names + +%inline { + + enum Hola { + hi, hello + }; + + struct A + { + A(int a, short b, Hola h) + { + } + + int func(int a) + { + return a; + } + + int func0(int c, int d) + { + return c; + } + + int func1(int c, int d) + { + return c; + } + + int func2(A* c, double d = 2) + { + return 2; + } + + int func3(A* c, double d = 2) + { + return 2; + } + }; +} + + +// deleting typemaps and docs +%typemap(in) (int c, int d) ; +%typemap(doc) (int c, int d); + +// docs for some parameters +%typemap(doc) int a "a: special comment for parameter a"; +%typemap(doc) int b "b: another special comment for parameter b"; + +%callback(1) func_cb; + +%inline { + + struct B + { + B(int a, int b, Hola h) + { + } + + + int func(int c, int d) + { + return c; + } + + }; + + int func(int c, int d) { + return c; + } + + int funcio(int *INOUT) { + return 1; + } + + int func_cb(int c, int d) { + return c; + } + +} Modified: trunk/Examples/test-suite/common.mk =================================================================== --- trunk/Examples/test-suite/common.mk 2011-05-30 14:01:58 UTC (rev 12727) +++ trunk/Examples/test-suite/common.mk 2011-06-03 06:07:46 UTC (rev 12728) @@ -118,6 +118,7 @@ arrays_global \ arrays_global_twodim \ arrays_scope \ + autodoc \ bloody_hell \ bools \ catches \ Modified: trunk/Examples/test-suite/python/Makefile.in =================================================================== --- trunk/Examples/test-suite/python/Makefile.in 2011-05-30 14:01:58 UTC (rev 12727) +++ trunk/Examples/test-suite/python/Makefile.in 2011-06-03 06:07:46 UTC (rev 12728) @@ -58,7 +58,6 @@ primitive_types \ python_abstractbase \ python_append \ - python_autodoc \ python_kwargs \ python_nondynamic \ python_overload_simple_cast \ Deleted: trunk/Examples/test-suite/python_autodoc.i =================================================================== --- trunk/Examples/test-suite/python_autodoc.i 2011-05-30 14:01:58 UTC (rev 12727) +++ trunk/Examples/test-suite/python_autodoc.i 2011-06-03 06:07:46 UTC (rev 12728) @@ -1,95 +0,0 @@ -%module(docstring="hello") python_autodoc - -%feature("autodoc"); - -// especial typemap and its docs -%typemap(in) (int c, int d) "$1 =0; $2 = 0;"; -%typemap(doc,name="hello",type="Tuple") (int c, int d) "hello: int tuple[2]"; - -// testing for different documentation levels -%feature("autodoc","0") A::func0; // names -%feature("autodoc","1") A::func1; // names + types -%feature("autodoc","2") A::func2; // extended -%feature("autodoc","3") A::func3; // extended + types - -%feature("autodoc","just a string") A::func; // names - -%inline { - - enum Hola { - hi, hello - }; - - struct A - { - A(int a, short b, Hola h) - { - } - - int func(int a) - { - return a; - } - - int func0(int c, int d) - { - return c; - } - - int func1(int c, int d) - { - return c; - } - - int func2(A* c, double d = 2) - { - return 2; - } - - int func3(A* c, double d = 2) - { - return 2; - } - }; -} - - -// deleting typemaps and docs -%typemap(in) (int c, int d) ; -%typemap(doc) (int c, int d); - -// docs for some parameters -%typemap(doc) int a "a: special comment for parameter a"; -%typemap(doc) int b "b: another special comment for parameter b"; - -%callback(1) func_cb; - -%inline { - - struct B - { - B(int a, int b, Hola h) - { - } - - - int func(int c, int d) - { - return c; - } - - }; - - int func(int c, int d) { - return c; - } - - int funcio(int *INOUT) { - return 1; - } - - int func_cb(int c, int d) { - return c; - } - -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |