Commit graph

3,785 commits

Author SHA1 Message Date
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
dd4c680a02 Use Python-ish, not C++, parameter types in Python documentation.
Using C++ types in documentation for Python users is more harmful than
useless, so use Python types whenever possible and allow defining "doctype"
typemap to customize this for the user-defined types.
2014-08-22 17:45:22 +02:00
Vadim Zeitlin
d677321323 No real changes, just rewrite the parameter iteration loop to be more clear.
Also remove unused commented out code.
2014-08-22 17:45:21 +02:00
Vadim Zeitlin
3db8c1fca2 Fix memory leaks in Doxygen to PyDoc parameter types conversion code.
Don't forget to delete the local copy of parameter list and the temporary
string.
2014-08-22 17:45:21 +02:00
Vadim Zeitlin
b96dd8bb97 Implement translation of Doxygen formulae to Sphinx notation.
This allows to automatically have nicely looking formulae in HTML output when
using Sphinx with e.g. sphinx.ext.mathjax extension.
2014-08-22 17:45:21 +02:00
Vadim Zeitlin
acc5bb60a1 Attach Doxygen comments to enum elements in Python output.
Sphinx is smart enough to use the docstrings following the constant definition
in Python code as its documentation, so doing this is still useful even if
Python itself doesn't support having docstrings for the variables (and this is
why it's impractical to write a unit test for the changes of this commit: we
can't easily extract the generated docstrings).
2014-08-13 16:11:30 +02:00
Vadim Zeitlin
7d2743a0bb Use reST inline markup in PyDocConverter instead of Markdown.
reST is standard Python markup, so use *...*, ``...`` and so on instead of
_..._, '...' etc.

No other changes even though the mapping of some Doxygen tags to markup used
for them seems suspicions (e.g. \var almost certainly should be the same as
\em).
2014-08-13 16:11:30 +02:00
Vadim Zeitlin
b374aad0da Use Sphinx-compatible docstring format in PyDocConverter.
Use the more or less standard :param:, :type:, :return: and :raises: in the
function/methods descriptions.

Update the output expected from the Python tests accordingly.
2014-08-13 16:11:30 +02:00
Vadim Zeitlin
a76c1343b7 Simplify management of tag handlers in PyDocConverter.
Avoid having to pass dummy empty string arguments, just use default value for
the unused last parameter of handleParagraph().

Also get rid of dozens of "" occurrences in the tag map initialization code,
use a helper function instead.

No real changes.
2014-08-13 16:11:30 +02:00
Vadim Zeitlin
f684242467 Replace DoxygenTranslator debug parameters with a single flags one.
This makes the code more readable and more extensible as more flags are easier
to add in the future than more boolean parameters.

No user-visible changes.
2014-08-13 16:11:30 +02:00
Vadim Zeitlin
6cce652762 Merge latest master into doxygen branch again.
Update Doxygen-specific Python unit tests to work with the new indentation.

Update one of Doxygen-specific Java tests to still build with the new handling
of srcdir.
2014-08-13 16:11:21 +02:00
Olly Betts
8d226e39dc Merge pull request #188 from jschueller/python_pep8
Python PEP-8 conformity
2014-06-10 23:48:38 +12:00
Julien Schueller
6fe71da9fa Fixed remaining pep8 errors 2014-06-07 13:09:15 +02:00
Jason Turner
fa36b6228e Fix function naming conflict with class overloads.
This fix takes into account the classname while generating overload
handlers.

Example:

If you have two classes:

  class A {
    public:
      void doSomething(int);
      void doSomething(double);
  };

  class B {
    public:
      void doSomething(int);
      void doSomething(double);
  };

Before this patch, the overload handlers for A::doSomething and
B::doSomething create conflicting names and function redefinition errors
are caused.

After the patch, the overload handlers are named classname_doSomething
and no longer conflict.

This is might not the best way to implement this, but it
solves a critical problem on large projects, and specifically can affect
operator overloads that are being wrapped.
2014-06-06 18:24:22 +02:00
Julien Schueller
93e06c0e58 Fixed another E231 2014-06-06 14:44:46 +02:00
Julien Schueller
36cac80166 Fixed some pep8 issues E701 2014-06-06 14:27:17 +02:00
Julien Schueller
01a9946455 Fixed some pep8 issues E302 2014-06-06 11:28:00 +02:00
Julien Schueller
0d589349a1 Fixed pep8 issues E701, E203, E231, E261 2014-06-06 11:03:46 +02:00
Julien Schueller
e0c432f70d Use 4 spaces in emitFunctionShadowHelper for python 2014-06-05 16:51:23 +02:00
William S Fulton
81d023ac05 Merge branch 'wkalinin-csymbols-2' - %extend and nested structs
* wkalinin-csymbols-2:
  Add runtime test for %extend and nested union
  test fixed
  %extend symbols for nested structs get into a wrong C symbol table
2014-06-02 07:11:22 +01:00
Karl Wette
6612997b63 Fix bug in DohNewStringWithSize(): guarantee string is nul-terminated 2014-06-01 15:33:26 +02:00
Karl Wette
ecf28da5a9 Octave: remove deprecated -global/-noglobal command-line arguments 2014-05-29 23:42:55 +02:00
Karl Wette
ebe1338015 Octave: whitespace/indentation cleanup of octave.cxx 2014-05-29 23:42:55 +02:00
Vladimir Kalinin
665c4f581b %extend symbols for nested structs get into a wrong C symbol table 2014-05-28 22:15:50 +04:00
William S Fulton
b531956467 Warning fixes compiling with Visual Studio 2014-05-27 21:55:17 +01:00
William S Fulton
71e72c45ed Create separate extetnd.c file for handling extensions / %extend
This is just a simple code refactor, moving and function renaming to
remove the %extend code out of the parser into its own file now
 that it isn't just used in the parser.
2014-05-21 19:16:15 +01:00
William S Fulton
9e4bce051d Merge branch 'wkalinin-csymbols-1'
* wkalinin-csymbols-1:
  obscure case workaround in std::set wrapper, where ignored type still need to be processed
  global unnamed structures ignored
  test added for nested unnamed C struct %extend
  %extend for nested unnamed C structs
2014-05-20 18:10:41 +01:00
Oliver Buchtala
0c42158723 Javascript: preparations for using Language::getNSpace(). 2014-05-19 00:20:19 +02:00
Vladimir Kalinin
d2ab75f907 obscure case workaround in std::set wrapper, where ignored type still need to be processed 2014-05-19 02:05:23 +04:00
Vladimir Kalinin
3692e175bc global unnamed structures ignored 2014-05-15 03:13:25 +04:00
Vadim Zeitlin
4f032332c9 Work around apparent clang bug.
Clang seems to be confused by "tm" being the name both of a local variable and
a struct tm from the standard <time.h> header, included indirectly in the
doxygen branch from java.cxx via "swig.h" and <stdlin.h>.

Just removing the unnecessary cast helps to clear the confusion.
2014-05-15 01:01:31 +02:00
Vladimir Kalinin
5d78f14b1c test added for nested unnamed C struct %extend 2014-05-14 00:56:39 +04:00
Vladimir Kalinin
2aa540b9c0 %extend for nested unnamed C structs 2014-05-14 00:51:36 +04:00
Vladimir Kalinin
55bda53145 C nested classes symbol table should be in global space 2014-05-10 22:16:26 +04:00
Vadim Zeitlin
c5e5978287 Merge with the master again.
Bring in the recent JavaScript changes.
2014-05-07 23:25:33 +02:00
Vadim Zeitlin
5c0ed6c635 No changes, just spelling fixes in Doxygen branch changes.
Most are just typos, but also s/JavaDoc/Javadoc/ and s/PythonDoc/Pydoc/ as
this is how they are officially called.
2014-05-07 19:12:10 +02:00
Vadim Zeitlin
c6ef433b9b Don't leak doxygenTranslator in Python module.
Delete the pointer we allocate, just as in Java module.
2014-05-07 18:57:14 +02:00
Vadim Zeitlin
984d5fa299 Initialize doxygenTranslator pointer to NULL when it is unused.
No real changes, but avoid having pointer with junk contents, even if it's
unused.

This also avoid the need for checking whether it's used before deleting it.
2014-05-07 18:46:30 +02:00
Vadim Zeitlin
ed40190fe1 Remove unused and apparently unnecessary file.
This is probably another Eclipse (?) leftover.
2014-05-07 18:43:50 +02:00
Vadim Zeitlin
46a375a135 Avoid unnecessary compilation dependency on DoxygenTranslator.h.
Use forward declaration instead of including this header in the common header
used by all languages (and not just the two of them that actually use
DoxygenTranslator currently).
2014-05-07 18:43:01 +02:00
Vadim Zeitlin
a1c539ed26 Avoid crash in the parser for two consecutive Doxygen comments.
This change fixes the crash which happened when parsing the following code:

	/// Description of the section.
	//@{
	...
	//@}

As the second Doxygen item didn't have any associated text in this case.
2014-05-07 18:32:28 +02:00
Karl Wette
d5b765d388 Whitespace cleanup of all Makefiles*
- some of the %.clean rules in the test-suite Makefiles were using a single tab
  as an empty rule, dangerous! I've replaced these with the safer '@exit 0'.
2014-05-02 20:06:11 +02:00
William S Fulton
a6e5e97157 Javascript cosmetic changes 2014-05-01 19:41:17 +01:00
William S Fulton
f51be1ca5c Merge branch 'master' into javascript
* master:
  Fix some typos
  [PHP] The generated __isset() method now returns true for read-only properties.
  Eliminate needless casting away const from string constants
  Fix typos
  Fix missing ")" in code example
  Fix comment typos
  Fix m4 quoting of checks for yodl2man and yodl2html versions
  Fixed errors from previous commit.
  Removed all unnecessary asserts
  Remove unused variable
  Another go html fix
  Fix intgosize arg documentation
  Optimize metamethods inheritance resolving
  Updating documentation
  Whitespace cleanup of Example Makefiles
  .gitignore: ignore Lib/swigwarn.swg
  Fixing unused variable warnings
  Finish implementation with proxy functions
  Remove duplicate declarations of strtoimax and strtoumax in inttypes.i
  Ignored enum fixes.
  Further shift operator regression fixes
  Fix use of shift operators in expressions regression since 3.0.0
  Fix seg fault with extra ) brackets and >>
  More efficient end of template bracket (>>) handling
  beautify scanner.c
  Tidy up scanner.c
  DOH readme correction
  Fix typo in -lua -help output
  Remove extra </div>
  Update documentation for deprecation and removal of Close()
  Fix segfault when there are too many closing round brackets in parsed code
  Refix operator<< definition giving a syntax error
  Fix regression in 3.0.0 where legal code following an operator<< definition might give a syntax error.
  Remove unnecessary block from PHP version of SWIG_exception macro
  [PHP] Fix wrapping director constructors with default parameters with a ZTS-enabled build of PHP.
  Fix potential bugs found by Coverity analysis
  Eliminate unused parameter from SWIG_Php_GetModule()
  Fix comment typo
  Fix compiler warnings in generated Lua code
  [PHP] Pass the ZTS context we already have to avoid needing to call TSRMLS_FETCH, which is relatively expensive.
  [PHP] Pass ZTS context through to t_output_helper() so it works with a ZTS-enabled build of PHP.  Reported by Pierre Labastie in github PR#155.
  Lua test-suite can now be run out of source
  Fix out of source test-suite runs for Octave
  Add runtime test for commit 7a96fba836
  Add C++11 constexpr runtime test
2014-05-01 19:01:20 +01:00
William S Fulton
5792e97a44 Javascript: ensure banner appears before %begin code 2014-05-01 18:13:35 +01:00
Olly Betts
73bb909bae [PHP] The generated __isset() method now returns true for read-only properties. 2014-05-01 14:37:58 +12:00
Vadim Zeitlin
1ebd2334b8 Merge branch 'master' into doxygen
Merge with ~3.0.1 sources from master.
2014-04-30 18:37:57 +02:00
Olly Betts
36be36d618 Eliminate needless casting away const from string constants 2014-04-30 12:00:23 +12:00
Olly Betts
618868ce3d Fix typos 2014-04-29 11:31:29 +12:00
Olly Betts
1a256b7f32 Merge pull request #160 from v-for-vandal/issue_157
Fixing unused variable warnings
2014-04-28 08:10:54 +12:00