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
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
Julien Schueller
6fe71da9fa
Fixed remaining pep8 errors
2014-06-07 13:09:15 +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
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
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
William S Fulton
4fb940d913
Further fixes when using type() when using -builtin to include module name
...
Using type() on a builtin type should include the package and module
name, see http://docs.python.org/2/c-api/typeobj.html
2014-03-01 23:26:27 +00:00
Soeren Sonnenburg
d8bfe00e25
Include module name if non NULL in tp_name
2014-03-01 23:26:27 +00:00
Arnaud Diederen
8998f11ca3
Fix Python argument count checking when using -modern
...
SF bug: https://sourceforge.net/p/swig/mailman/message/31957171/
SF Patch: 3471
2014-03-01 16:43:49 +00:00
William S Fulton
44dd28950c
Python import code beautify
2013-12-24 17:22:42 +00:00
Paweł Tomulik
5562deec62
Fixed SF bug #1297 (Python imports)
...
This changeset resolves several issues related to python imports.
For example, it's possible now to import modules having same module
names, but belonging to different packages.
From the user's viewpoint, this patch gives a little bit more control on
import directives generated by swig. The user may choose to use relative
or absolute imports (docs are provided in separate PR).
Some details:
- we (still) generate import directives in form 'import a.b.c' which
corresponds to absolute imports in python3 and (the only available)
ambiguous one in python2.
- added -relativeimport option to use explicit relative import syntax
(python3),
Tests are under Examples/python, these are in fact regression tests but
with the current swig testing framework it seems to be impossible to put
appropriate tests under test-suite.
Closes #7
2013-12-24 17:22:25 +00:00
William S Fulton
279ebdc0cf
Beautify director output
2013-12-23 18:21:52 +00:00
William S Fulton
bcb7aee022
Merge branch 'master' into gsoc2009-matevz
...
Conflicts:
Examples/Makefile.in
Examples/guile/Makefile.in
Lib/php/php.swg
Makefile.in
Source/CParse/parser.y
configure.ac
2013-10-10 07:26:09 +01:00
Olly Betts
12708c9241
Fix typos
2013-09-25 17:29:33 +12:00
Olly Betts
628b4710e5
[Python] Fix clang++ warning in generated wrapper code.
2013-08-24 08:40:08 +12:00
Olly Betts
b477cb66be
Use offsetof() rather than icky homemade equivalent
2013-08-24 08:34:50 +12:00
William S Fulton
d0af4f50d3
Add %pythonbegin directive.
...
For adding code at the beginning of the generated .py file.
2013-07-05 06:30:16 +01:00
William S Fulton
779dc402b6
Fix a const_cast in generated code that was generating a <:: digraph when using the unary scope operator (::) (global scope) in a template type.
...
Affects Python, Ruby, Ocaml.
Based on SF patch #341 .
2013-07-01 20:00:12 +01:00
William S Fulton
0f1e3da5de
Fix the high passed to PyTuple_GetSlice in varargs wrappers.
...
Harmless bug as slices can take any size larger than the actual size for
the high value. Reported in SF Bug 1326.
2013-05-23 21:25:41 +01:00
Marko Klopcic
9cd379b800
fixed bug with autodoc, manual updated with table description and tests description
2013-02-21 22:50:15 +01:00
Marko Klopcic
29d1bba70a
improved comment formatting for Python
2013-02-02 23:01:09 +01:00
William S Fulton
d172e3d0ed
Apply patch SF #334 - Fix Python default value conversions TRUE->True, FALSE->False.
2013-01-29 07:31:11 +00:00
William S Fulton
e805d5f925
Merge branch 'master' into gsoc2009-matevz
...
parser.y still to be fixed up
Conflicts:
Doc/Devel/engineering.html
Examples/Makefile.in
Lib/allegrocl/allegrocl.swg
Lib/csharp/csharp.swg
Lib/csharp/enums.swg
Lib/csharp/enumsimple.swg
Lib/csharp/enumtypesafe.swg
Lib/java/java.swg
Lib/python/pydocs.swg
Lib/r/rtype.swg
Source/Include/swigwarn.h
Source/Modules/octave.cxx
Source/Modules/python.cxx
Source/Modules/ruby.cxx
Source/Swig/scanner.c
Source/Swig/stype.c
Source/Swig/swig.h
configure.ac
2013-01-28 07:01:37 +00:00
William S Fulton
7841a0d097
Remove cvs/svn Id strings
2013-01-12 01:21:16 +00:00
William S Fulton
4c1b566f62
Fix fully qualified package paths for Python 3 even if a module is in the same package
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13955 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-12-11 18:42:58 +00:00
William S Fulton
092e2104c7
More consistent use of DOH namespace
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13940 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-26 20:31:54 +00:00
William S Fulton
d93dc0f8e2
Distinguish between an "abstract" attribute on a class containing a list of abstract members and an "abstract" flag on pure virtual methods - renamed former to "abstracts"
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13935 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-24 14:13:58 +00:00
William S Fulton
0d2c459046
Remove some unused code and pointless variable assignments
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13932 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-23 07:38:00 +00:00
William S Fulton
2b8bfe410e
Remove unnecessary null checks or fix potential null dereferences
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13924 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-20 23:29:35 +00:00
William S Fulton
d918bddfc0
Fix segfaults when using filename paths greater than 1024 characters in length - use String * and heap instead of fixed size static char array buffers.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13904 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-18 00:45:18 +00:00
William S Fulton
5a1e82a2f4
Remove DohClose (Close) and replace with calls to DohDelete (Delete) to fix some minor memory leaks in most uses of NewFile.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13885 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-14 22:16:07 +00:00
William S Fulton
b1ee062d2a
Cosmetic variable renaming for consistency across language modules
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13874 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-10-27 17:38:05 +00:00
William S Fulton
f6229d4b73
Fix director typemap searching so that a typemap specified with a name will be correctly matched. Previously the name was ignored during the typemap search. Implemented by ensuring the 'type' attribute in the Node is set up correctly and using the usual Swig_typemap_lookup on the Node.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13873 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-10-27 17:37:34 +00:00
William S Fulton
ecac2d2a68
Improve nullptr constant wrapping
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@13842 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-09-20 19:09:38 +00:00
Dmitry Kabak
c592e0db51
Made doxygen parsing switched off by default
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-doxygen@13602 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-13 09:09:25 +00:00
Dmitry Kabak
3fbe45f0c6
Added nice doxygen debug switching (-debug-doxygen-parser and -debug-doxygen-translator)
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-doxygen@13427 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-07-29 13:48:03 +00:00
William S Fulton
7b58300cbd
Fix display of pointers on 64 bit systems, only 32 bit values were being shown.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13340 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-07-21 22:52:30 +00:00
Dmitry Kabak
2004ff23b9
Removed the unwanted header
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-doxygen@13251 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-07-04 21:47:57 +00:00
Dmitry Kabak
4289b8e273
Refactored comment translator class, implemented result caching
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-doxygen@13191 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-06-25 15:47:36 +00:00
Dmitry Kabak
72b23954fb
Fix integration of doxygen with autodoc feature, fixed autodoc test and some code refactored
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-doxygen@13183 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-06-18 18:33:30 +00:00
Dmitry Kabak
ac6b51f13e
Fix to include comment for non-member functions in python
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-doxygen@13149 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-06-04 18:02:51 +00:00
Dmitry Kabak
ce39e74f28
Applied Christopher Mangiardi's patch that fixes incorrect comment placement in python single line functions
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-doxygen@13133 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-05-28 19:47:03 +00:00
William S Fulton
af1c6ac3c3
Merge trunk (up to just after swig 2.0.5 release - rev 13009) to gsoc2008-cherylfoil
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-cherylfoil@13017 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-04-27 18:55:37 +00:00
Olly Betts
49efe65a08
Remove superfluous ; after closing } of if statement
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12966 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-04-05 01:20:51 +00:00