Commit graph

4,090 commits

Author SHA1 Message Date
William S Fulton
8128b1e12f For Android examples, replace hard coded tool names with those detected at configure time. 2014-09-15 19:44:18 +01:00
Simon Marchetto
ef687d801e scilab: fix C++ examples cleaning 2014-09-15 10:22:42 +02:00
Olly Betts
1a99212c2c [PHP] Add support for specifying any PHP interfaces a wrapped class
implements, e.g.: %typemap("phpinterfaces") MyIterator "Iterator";
2014-09-12 12:48:37 -03:00
Simon Marchetto
d89f3bde90 scilab: fix Examples Makefile exit code 2014-09-12 12:04:40 +02:00
Olly Betts
e12322df86 [PHP] Fix throwing a PHP exception through C++ from a subclassed
director method - PHP NULL gets returned by the subclassed method
in this case, so the directorout typemap needs to allow that (at
least if an exception is active).
2014-09-11 13:09:08 -03:00
Olly Betts
fa94a29df4 Fix comment typo 2014-09-11 13:06:17 -03:00
Simon Marchetto
2bcd768909 scilab: display loading errors in examples 2014-09-11 08:56:04 +02:00
Vadim Zeitlin
05b5ed11bc Add a possibility to flexibly ignore custom Doxygen tags.
Add %feature("doxygen:ignore:<command>") implementation, documentation and
test case.

This feature allows to use custom tags in C++ Doxygen comments for
C++-specific things that don't make sense in the context of the target
language and also allows to insert contents specific to the target language in
the C++ comments using (different) custom commands, which is very useful in
practice to explain the particularities of the API wrappers.
2014-09-11 01:39:42 +02:00
Vadim Zeitlin
cd1f4619d2 Stop completely ignoring many Doxygen comments.
For some reason, Doxygen comments such as @class or @enum were considered to
be "structural" (whatever this means) and completely removed during the
parsing time. This is wrong as such comments can be attached to their
corresponding declarations and while it would be arguably better to check that
this is indeed the case (e.g. "@class Foo" really appears before or after the
declaration of this class), throwing them away is definitely not the right
thing to do and keeping them without any further checks is a better alternative.
2014-09-10 21:55:41 +02:00
Vadim Zeitlin
846a90f8d7 Use "//", not "#", for comments in SWIG input.
One Doxygen test file used "#" for comments for some reason, this doesn't work
with the latest SWIG trunk where a lone "#" is considered to be an unknown
preprocessor directive.
2014-09-10 21:55:41 +02:00
Ian Lance Taylor
acaaa0f31f [Go] Add goargout typemap. 2014-09-09 11:28:04 -07:00
Olly Betts
0dd7b61c57 Fix segmentation faults with directors in PHP >= 5.4 2014-09-09 13:39:30 -03:00
Simon Marchetto
e107faf5cc scilab: remove error messages in example contract 2014-09-09 14:47:20 +02:00
Simon Marchetto
7cd7166991 scilab: remove example matrix2 warnings 2014-09-09 14:21:06 +02:00
Ian Lance Taylor
be145043df Add run test case for argout.i. 2014-09-07 15:44:12 -07:00
Ian Lance Taylor
1addbb46a8 [Go] Add imtype, goin, goout, godirectorin, and godirectorout
typemaps, to support writing Go code to convert between types.
2014-09-05 17:54:19 -07:00
Olly Betts
6eaec9ce7c Update expected output for pp_constant error test 2014-09-04 09:29:20 -03:00
Olly Betts
b9fe7b5f00 Disable case in pp_constant.i which never actually worked 2014-09-03 17:18:11 -03:00
William S Fulton
ae6782ea34 Suppress testcase warning 2014-09-03 20:07:50 +01:00
Vadim Zeitlin
a1d7930835 Give warnings for unknown Doxygen commands in Doxygen parser.
Silently ignoring unknown Doxygen commands is not a reasonable default
behaviour, it's simple enough to turn off the warning if the command is really
supposed to be just ignored, but it's too easy to not notice a real problem if
it isn't.

Turn WARN_DOXYGEN_UNKNOWN_COMMAND on by default and add a test to the errors
test suite checking that it is indeed given.
2014-09-03 17:28:10 +02:00
William S Fulton
ea634d54a5 Synchronize common scilab examples with other languages 2014-09-03 07:18:10 +01:00
Olly Betts
d3b3ff2c78 Fix comment typo 2014-09-02 23:12:35 -03:00
William S Fulton
a41efbd0f7 File renames in Scilab std_list example
Conform to usual file naming used in SWIG examples.
2014-09-02 20:34:19 +01:00
William S Fulton
d3a54e50f8 Have just one Scilab constants example
Same example as other languages, but using %scilabconst(1)
2014-09-02 20:29:45 +01:00
William S Fulton
2831d891cd Use CXXSRCS for testing for Scilab like other languages 2014-09-02 20:12:19 +01:00
William S Fulton
7acf8de21e Scilab overloaded method testcase warning suppression 2014-09-01 19:56:39 +01:00
William S Fulton
b707ee0fc8 Suppress Identifier name exceeds 24 characters warning in Scilab example 2014-09-01 19:47:49 +01:00
William S Fulton
a022dc44cd Add RUNPIPE back in for Scilab examples 2014-09-01 19:46:56 +01:00
Alexey Pelykh
abb888cfdd Clean-up test suite and fix issue with nspace, as well as keep the fix for Class::Struct::EnumClass being JNI-referenced as Struct_EnumClass 2014-08-31 12:14:29 +03:00
Alexey Pelykh
d318f03efe C++11 strongly-typed enums fix for Java only (proper) 2014-08-30 11:58:52 +03:00
Alexey Pelykh
d1b1925270 Additional test cases for C++11 strongly-typed enums 2014-08-30 09:08:04 +03:00
Richard
a3946e1520 Remove unneeded parameter 2014-08-28 19:46:52 -05:00
Richard
b8d7cc21b9 Use macros for V8 items 2014-08-28 19:46:52 -05:00
Richard
c23375d39d Show V8 Deprecated warnings 2014-08-28 19:46:51 -05:00
Richard
2a662502a5 Fixed buffer overrun 2014-08-28 19:46:49 -05:00
Richard
b0afc7a9a5 Allow to specify V8 version, for example:
V8_VERSION=0x031511 ENGINE=v8 make check-javascript-test-suite
2014-08-28 19:46:49 -05:00
Richard
19d2976962 Allow to specify V8 version, for example
V8_VERSION=0x031511 ENGINE=v8 make check-javascript-examples
2014-08-28 19:46:49 -05:00
William S Fulton
332c02ae2d Scilab minor build system improvement 2014-08-26 19:52:03 +01:00
Vadim Zeitlin
6aa9cd37a5 Document the return type when translating Doxygen @return to Python.
In addition to translating the comment itself, also document the type of the
object returned. This is consistent with generating not only :param: but also
:type: for the parameters documented using @param.
2014-08-22 17:45:24 +02:00
Vadim Zeitlin
1f826b0925 Fix translated Doxygen comments for overloaded functions in Python.
The most important change is to ensure that the "Overload" headers added by
PyDocConverter code are indented correctly, i.e. using the same indent level
as the comment itself, otherwise Sphinx directives such as :param: were not
parsed correctly.

Also add a vertical separator using reST "|" formatting character to increase
separation between the overloads.
2014-08-22 17:45:24 +02:00
Vadim Zeitlin
73f6971931 Also merge Doxygen comments for overloaded constructors in Python.
This was done for plain functions/methods but not constructors, which don't
have "kind=function" attribute.

Just don't check for "kind" at all, the presence of "sym:overloaded" should be
good enough to indicate that it's an overloaded something.

Also add a test for overloaded constructors documentation.
2014-08-22 17:45:24 +02:00
Vadim Zeitlin
52bd2a1921 Allow using enum elements as default values for Python functions.
Enum values are just (integer) constants in Python and so can be used as the
function default values just as well as literal numbers, account for this when
checking whether function parameters can be represented in Python.

Also rename is_primitive_defaultargs() to is_representable_as_pyargs() to
describe better what this function does.
2014-08-22 17:45:24 +02:00
Vadim Zeitlin
16548cced0 Simplify and make more efficient building Python docstrings.
Make the rules for combining explicitly specified docstring, autodoc one and
the one obtained by translating Doxygen comments implicit in the structure of
the code itself instead of writing complicated conditions checking them.

This results in small changes to the whitespace in the generated Python code
when using autodoc, but this makes it PEP 8-compliant, so it is the right
thing to do anyhow.

Also cache the docstring built from translated Doxygen comments. The existing
code seemed to intend to do it, but didn't, really. This helps with
performance generally speaking (-10% for a relatively big library using a lot
of Doxygen comments) and also makes debugging Doxygen translation code less
painful as it's executed only once instead of twice for each comment.

Finally, avoid putting "r", used for Python raw strings, into docstrings in C
code, it is really not needed there.
2014-08-22 17:45:23 +02:00
Vadim Zeitlin
d678891e43 Translate Doxygen code blocks to Sphinx code blocks.
This ensures they are formatted correctly and syntax highlighted (currently
always as C++ code).
2014-08-22 17:45:23 +02:00
Vadim Zeitlin
0f21adf3f9 Add a simple test of multiple parameters to Doxygen test suite.
Ensure that translating more than one @param tag works correctly.
2014-08-22 17:45:23 +02:00
Vadim Zeitlin
bb01e06a6a Make Python parameters types hyperlinks in the doc strings.
It is very useful to be able to click on the parameter types in a function
documentation to go to this parameter description, so always use hyperlink
markup for the parameters of class types, even if not all of them are
necessarily documented -- Sphinx doesn't seem to complain about links to
unknown classes.
2014-08-22 17:45:23 +02:00
Vadim Zeitlin
8b83976f4c Fix arguments of @param, @return etc translations to Python.
For the parameter documentation to be really taken as such, in its entirety,
by Sphinx, it must be indented relative to the :param: tag. Do this by
appending an extra indent after every line of the output and work around the
unnecessary indent of the last line by removing the trailing whitespace.

This required updating the existing tests and removing the expected but not
present any more whitespace from them, but as trailing whitespace in the
documentation is at best insignificant (and at worst harmful) anyhow, this is
not a big price to pay for simpler translator code.
2014-08-22 17:45:22 +02:00
Vadim Zeitlin
14ba3b8dd4 Preserve relative indentation when parsing Doxygen comments.
This is important to preserve the structure of the lists which appear
correctly in Python output without any additional effort if the indentation is
lost.

It is also makes the behaviour consistent for

	/**
	 *
	 *
	 */

comments and those without the asterisks in the middle lines, as now the
indentation is preserved in both cases while it was only preserved when the
asterisks were present previously.
2014-08-22 17:45:22 +02:00
Vadim Zeitlin
ea1d56da67 Use Sphinx-friendly formatting for overloaded functions documentation.
Sphinx doesn't allow sections inside the function documentation and gives tons
of SEVERE warnings for them, so while just emphasizing the "Overload" header
is not ideal, it is better than before because at least the string "Overload"
itself appears in the Sphinx-generated output.
2014-08-22 17:45:22 +02:00
Vadim Zeitlin
eaf63ba47d Add poor man trailing white space detection to Doxygen Python tests.
Show that there is trailing white space in the output in an ugly but
functional way, as without this it's impossible to determine what is the
actual change at all.
2014-08-22 17:45:22 +02:00