Commit Graph

570 Commits

Author SHA1 Message Date
William S Fulton 727d74f6be Python C89 fix mixed code and declarations compiler error in constants code from patch #250 2015-01-28 08:09:06 +00:00
William S Fulton 760d603918 Warning and error fixes for Solaris Sun Studio compiler 2015-01-27 19:30:24 +00:00
William S Fulton 06fb68af5b Merge branch 'ptomulik-fix/py-object-const'
* ptomulik-fix/py-object-const:
  constant_directive_runme.py and classic classes
  additional fixes to %constant directive
  make %constant directive to work with structs/classes
2015-01-15 20:18:21 +00:00
William S Fulton afba5b755a Fix Python default args when using kwargs
Recent default arg handling fixes didn't fix the case when kwargs is turned on
2015-01-15 07:54:36 +00:00
William S Fulton 944fbfb426 Python 3 default args fix
Fix 0U and 0L as default args for Python 3 (tests committed in
previously commit of default_args.i).
Relates to issue #294.
2015-01-13 07:55:31 +00:00
William S Fulton 9d87b9f099 Revert introduction of python:defaultargs feature
See issue #294
2015-01-12 21:35:47 +00:00
William S Fulton 06e361dbf2 Fix linux gcc warnings and strtol corrections 2015-01-11 17:30:25 +00:00
Vadim Zeitlin adbe3f2e77 Python default arg improvements
Merge the code fixes from patch #294 to more reliably generate
default argument values into the python layer.
2015-01-11 16:42:21 +00:00
William S Fulton 38ba81811e Fix Python default argument handing broken since swig-3.0.3
Default values are no longer generated as Python code by default.
They must be explicitly turned on using the "python:defaultargs" feature.

Closes #294
Closes #296

The problems in these two issues when "python:defaultargs" is turned
on still need to be fixed and should be addressed in separate patches.
The important thing is the default code generation is now fixed.
2015-01-09 00:34:17 +00:00
Paweł Tomulik cfaf2f97fd additional fixes to %constant directive 2015-01-02 18:50:49 +01:00
Paweł Tomulik c21e2423a0 make %constant directive to work with structs/classes 2015-01-02 18:50:49 +01:00
Vadim Zeitlin fd47e6870e Fix autodoc strings generated in Python builtin case and the test.
Use the proper AUTODOC_METHOD for autodoc strings generation when using
"-builtin", there is no reason to use AUTODOC_FUNC here when AUTODOC_METHOD is
used by default (i.e. without "-builtin").

This allows to (almost) stop differentiating between the two cases in the
autodoc unit test, allowing to simplify it significantly.

Also fix this test to pass after the recent changes removing docstring
indentation in the generated code.
2014-12-15 20:27:46 +01:00
Vadim Zeitlin d5c5cd4521 Use class docstrings in "-builtin" Python case.
Put the docstring into tp_doc slot which exists exactly for this purpose.
2014-12-15 13:59:17 +01:00
Vadim Zeitlin 410b508e9a Don't indent Doxygen doc strings in generated Python code.
This is unnecessary and inconsistent with "builtin" case in which the
docstrings are not indented in the generated C++ code, thus making it
impossible to write tests working in both cases.

Most of the changes in this commit simply remove the extra whitespace from the
expected values in the tests.
2014-12-15 13:59:17 +01:00
Vadim Zeitlin 9b857e6cf1 Merge latest master into doxygen branch. 2014-12-15 02:55:26 +01:00
William S Fulton 6d6cefa791 Fix 'self' parameter name clash when generating for Python builtin 2014-10-31 07:23:08 +00:00
William S Fulton cd725fbe94 Minor cosmetic source code changes 2014-10-28 07:07:44 +00:00
William S Fulton 36ae32e941 Merge remote-tracking branch 'vadz/py-args'
* vadz/py-args:
  Allow using enum elements as default values for Python functions.
  Don't always use "*args" for all Python wrapper functions.
  No real changes, just make PYTHON::check_kwargs() const.
  Refactor: move makeParameterName() to common Language base class.
  Remove long line wrapping from Python parameter list generation code.
2014-10-27 20:02:59 +00:00
William S Fulton bfde148887 The kwargs feature no longer turns on compactdefaultargs for languages that don't support kwargs.
Affects all languages except Python and Ruby.

Closes #242
2014-10-21 07:34:51 +01:00
William S Fulton b57a675d00 Cosmetic comment changes
Note: copyrights are in the COPYRIGHT file
2014-10-21 07:34:51 +01:00
Yann Diorcet 558af639bd Python: Fix property access with director 2014-10-01 11:07:02 +02:00
Olly Betts 926fd75878 Additional fixes for #218. 2014-09-02 23:12:09 -03:00
Olly Betts f3a6c55929 [Python] Fix regression in indentation of python code produced with -modern,
introduced by changes in #188.  Reported by fabiencastan in #218.
2014-09-02 02:34:01 -03: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 8734c658d7 Don't always use "*args" for all Python wrapper functions.
Due to what seems like a bug introduced during Python 3 support merge, all the
generated Python functions used the general "*args" signature instead of using
the named parameters when possible.

This happened due to is_primitive_defaultargs() always returning false for the
functions without any default arguments as "value" passed to convertValue()
was NULL in this case and convertValue() always returns false for NULL.

Fix this by checking for value being non-NULL before calling convertValue().

Doing this exposed several problems with the handling of unnamed, duplicate
(happens for parameters called INOUT, for example) or clashing with keywords
parameter names, so the code dealing with them had to be fixed too. Basically
just use makeParameterName() consistently everywhere.
2014-08-22 17:45:23 +02:00
Vadim Zeitlin 1f41850e34 No real changes, just make PYTHON::check_kwargs() const.
This will allow calling it from const methods too.
2014-08-22 17:45:23 +02:00
Vadim Zeitlin 9a511f1a33 Remove long line wrapping from Python parameter list generation code.
This doesn't play well with PEP8 checks which imposes very strict continuation
line indentation rules which need to be _visually_ aligned, i.e. the subsequent
lines must be indented by the position of the opening bracket in the function
declaration line, but the code generating the parameter lists doesn't have
this information and so it's impossible to do it while avoiding either E128 or
E123 ("continuation line {under,over}-indented for visual indent" respectively)
error from pep8.

Moreover, the wrapping code didn't work correctly anyhow as it only took into
account the length of the parameter list itself and not the total line length,
which should include the function name as well.

So just disable wrapping entirely, long lines shouldn't be a problem anyhow in
auto-generated code.
2014-08-22 17:45:23 +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 15b369028f 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-17 01:08:32 +02:00
Vadim Zeitlin fdc6bbeda3 Don't always use "*args" for all Python wrapper functions.
Due to what seems like a bug introduced during Python 3 support merge, all the
generated Python functions used the general "*args" signature instead of using
the named parameters when possible.

This happened due to is_primitive_defaultargs() always returning false for the
functions without any default arguments as "value" passed to convertValue()
was NULL in this case and convertValue() always returns false for NULL.

Fix this by checking for value being non-NULL before calling convertValue().

Doing this exposed several problems with the handling of unnamed, duplicate
(happens for parameters called INOUT, for example) or clashing with keywords
parameter names, so the code dealing with them had to be fixed too. Basically
just use makeParameterName() consistently everywhere.
2014-08-17 01:08:32 +02:00
Vadim Zeitlin 80a72d50c7 No real changes, just make PYTHON::check_kwargs() const.
This will allow calling it from const methods too.
2014-08-16 13:11:22 +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 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
Vadim Zeitlin 07e2568a20 Remove long line wrapping from Python parameter list generation code.
This doesn't play well with PEP8 checks which imposes very strict continuation
line indentation rules which need to be _visually_ aligned, i.e. the subsequent
lines must be indented by the position of the opening bracket in the function
declaration line, but the code generating the parameter lists doesn't have
this information and so it's impossible to do it while avoiding either E128 or
E123 ("continuation line {under,over}-indented for visual indent" respectively)
error from pep8.

Moreover, the wrapping code didn't work correctly anyhow as it only took into
account the length of the parameter list itself and not the total line length,
which should include the function name as well.

So just disable wrapping entirely, long lines shouldn't be a problem anyhow in
auto-generated code.
2014-08-10 14:52:00 +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
Olly Betts d3987ca87c Fix bad change from r12830.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12964 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-04-04 13:46:16 +00:00
William S Fulton 468ca084fc Correct special variables in 'directorargout' typemap. This change will break any 'directorargout' typemaps you may have written. Please change: to and to \n Also fix the named 'directorargout' DIRECTOROUT typemaps for these languages which didn't previously compile and add in , etc expansion.\n [C#, Go, Java, D] Add support for the 'directorargout' typemap.\n [Java] Add (char *STRING, size_t LENGTH) director typemaps.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12877 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-12-20 20:50:36 +00:00
William S Fulton 24133bacd7 Remove numerous hard coded 'result' variable name in generated c/c++ wrappers. The variable name is now defined in just one place, making it possible to change the name easily if a target language so wishes - see cwrap.c.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12830 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-10-30 21:51:50 +00:00
Stefan Zager b61ccd00ec Bug 3400486: Fix error signalling for built-in constructors.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12792 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-08-30 21:37:16 +00:00
William S Fulton 44c202d048 Add in $symname expansion for director methods
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12772 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-08-04 19:45:19 +00:00
Stefan Zager 498367bc9d From swig-user 7/6/11: fix closure for tp_call.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12761 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-07-20 15:20:24 +00:00
Stefan Zager 0df6937fbf Bug 3324753: fix %rename for member variables under -builtin
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12756 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-07-14 05:15:05 +00:00
William S Fulton 72ffdb930d Repeat autodoc fixes for Octave and Ruby as done previously for Python
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12740 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-06-13 20:46:20 +00:00
William S Fulton a4f8ed4fc9 Fix last checkin for renamed parameters
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12736 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-06-10 20:26:07 +00:00
William S Fulton 3243cbaad4 Numerous autodoc fixes for Python
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12735 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-06-10 19:33:40 +00:00
William S Fulton 315dd8fb2f Add in error handling in the even of not being able to find a base when initializing a builtin type - should the base not be loaded
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12693 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-20 05:58:05 +00:00
William S Fulton b78392832f [Lua, Python, Tcl] C/C++ prototypes shown in error message when calling an overloaded method with incorrect arguments improved to show always show fully qualified name and if a const method. Also fixed other Lua error messages in generated code which weren't consistently using the fully qualified C++ name.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12655 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-05 06:23:02 +00:00
Stefan Zager e629b192e2 Fixed the argument counts passed to SWIG_Python_UnpackTuple for varargs.
Removed obsolete methods from std_map.i and pyiterators.swg.

Added builtin-check target to python test suite Makefile.

Fixed using_namespace_loop.i so that the generated wrappers will compile.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12644 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-29 18:25:16 +00:00
Stefan Zager 8f07b3f851 Testcase and fix for bug 1163440: vararg typemaps.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12639 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-12 18:55:24 +00:00
Stefan Zager 257b75c23c Fixed PyVarObject_HEAD_INIT calls for VC++.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12634 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-11 22:06:02 +00:00
William S Fulton 139ccc434e Workaround incorrect gcc 4.4 and 4.5 warning with -O2 -Wextra in generated code
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12631 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-11 18:45:07 +00:00
William S Fulton 781b468aa1 Sun Studio warning fixes for Python builtin
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12625 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-10 00:23:48 +00:00
William S Fulton abdd41dc91 Restore extern "C" back to what it was to remove Solaris warnings
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12621 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-09 23:08:03 +00:00
Stefan Zager 8f876a6287 Minor tweaks to enable -builtin with C code.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12618 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-08 23:05:20 +00:00
Stefan Zager 5c4f47302a Initialize all fields of PyTypeObject, to eliminate compiler warnings. Fixed typo in docs.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12612 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-05 23:16:13 +00:00
William S Fulton b2b9e2eb91 Python builtin - warning suppression/fixes for 'gcc -Wall' and cosmetic changes in generated code.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12609 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-05 20:39:44 +00:00
William S Fulton 5f6389ab31 Cosmetic Python changes and replace DOH types
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12608 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-04 20:13:14 +00:00
Stefan Zager 20cda0168e Eliminate warnings about empty case statements.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12604 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-03 19:44:46 +00:00
Stefan Zager c95cc72454 Merged %pythonnondynamic fix
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12594 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-03 05:15:48 +00:00
Stefan Zager 90fe22acf7 Fix for METH_O and -compactdefaultargs, in two parts:
- Don't mark a method as METH_O if it has compactdefaultargs
  - In SWIG_Python_UnpackTuple, allow for a non-tuple 'args'.

Added compatibility for python versions 2.3 and 2.4.  These are only
partially supported; inheriting from wrapped types looks problematic.
Versions older that 2.3 are unlikely ever to work.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12590 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-02 21:40:00 +00:00
Stefan Zager cd7fc2047b Factored some #ifdef noise out of the initialization function by adding
SwigPyBuiltin_SetMetaType.

For %import statements, move the runtime import out of SWIG_init and into the
.py file.  The reason for this is that the import must be executed within the
python execution frame of the module, which is true in the .py file, but *not*
true in the initialization function.  Had to re-order the .py file slightly
to put the 'import' statements at the top; that's necessary to make sure base
types from an imported module are initialized first.  If -builtin isn't used,
then the .py code is not re-ordered.

Added an explanation and workaround for the limitation that wrapped types are
not raise-able.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12585 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-01 19:35:30 +00:00
Stefan Zager 51ef340eed Converted rest of slot outputting to use printSlot.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12583 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-31 21:26:12 +00:00
Stefan Zager f1cb5b7ca6 Bug fix: missing quotation mark on autodoc string
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12582 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-31 20:37:23 +00:00
Stefan Zager bc200998b1 Added usage message for -builtin, and tweaked -builtin docs.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12574 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-30 19:51:22 +00:00
Stefan Zager 3d444101d1 A slew of changes based on William Fulton's code review.
- Fixed naming conventions; SwigPyBuiltin is used a lot
- Removed use of std::vector
- builtin.swg isn't included if -builtin isn't specified
- Changed many feature names to use a "python:" prefix
- Eliminated static vars in std_pair.i
- Eliminated C++-style comments (//)
- Enabled autodoc and docstring with -builtin
- Fixed non-ansi generated C code
- Detect and complain if two incompatible swig modules are loaded
- Removed argcargvtest_runme3.py, and fixed argcargvtest_runme.py
  so that 2to3 handles it better
- Removed anonymous namespaces
- Eliminated builtin_init typemaps; consolidated functionality into
  SWIG_Python_NewPointerObj
- Eliminate printf warnings from %U conversion character by switching
  to %S, which works just as well
- Fixed li_std_set_runme.py for python3, which returns set members in
  a different order from python2





git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12562 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-29 06:57:02 +00:00
Stefan Zager 93499e12af Merged trunk up to revision 12551
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12552 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-24 05:46:05 +00:00
William S Fulton a63d456f8a Remove redundant code highlighted by warnings in gcc-4.6
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12536 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-14 07:22:08 +00:00
William S Fulton 5f4d8c6112 Fix SF #3194294 - corner case bug when 'NULL' is used as the default value for a primitive type parameter in a method declaration.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12525 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-09 22:31:08 +00:00
William S Fulton d008ab2bc6 Remove local mode editor setting - editors should be set up correctly for the whole of SWIG
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12517 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-03 19:42:43 +00:00
William S Fulton cca5a76d91 Minor rewrites of some recent builtin changes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12516 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-03 19:39:48 +00:00
William S Fulton 908c37cef8 Coding style fixes for Python builtin changes added on the szager-builtin branch
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12515 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-03 19:34:18 +00:00
William S Fulton 084a3c7205 Run make beautify on python.cxx to fix code style to match style on szager-builtin branch
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12514 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-03 19:33:25 +00:00
William S Fulton 0a5ca9ccd6 Fix potential name clash in director class
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12501 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-20 13:47:14 +00:00
Stefan Zager ea4cab8e4c A small unicode fix.
A partial fix for the problem with overloading, varargs,
and fastunpack: with this fix, the wrappers will compile.
However, they still contain faulty logic and unreachable
code in the dispatch function.

The comprehensive fix would have to be in overload.cxx.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12465 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-17 05:52:18 +00:00
Stefan Zager b5889b8b0f Unicode fixes for python3.
Added a few more closure types.

Guard against operator overloads outside of a class declaration.

Incorporate fix for patch #3171793.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12446 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-09 08:59:09 +00:00
Stefan Zager 62fef1bf99 python3 support; passes all regressions.
Adding argcargvtest_runme3.py, because 2to3 can't handle it.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12425 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-03 07:21:37 +00:00
Stefan Zager 00b5fa9c47 Now passes regressions with '-O -builtin'. Almost all changes
are to accomodate -fastunpack.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12423 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-02 10:28:46 +00:00
Stefan Zager 288c37f5bf Regressions pass! With a few tweaks for unsupported features, primarily:
- Throwing wrapped types as exceptions is unsupported.
- Reverse comparison operators (e.g., __radd__) aren't supported.

Rationalized destructors.

Finished std::map implementation.  Required fixes to typecheck for
SWIGTYPE* const&.

Need a little special handling of the swig_type_info for SwigPyObject
when multiple modules are loaded.

Fall back to SwigPyObject_richcompare if there's no operator overload.

"memberget" and "memberset" attrs are applied strangely; work around
them.

Added 'this' attribute.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12415 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-30 03:17:28 +00:00
Stefan Zager d4b8048e9a Stopped using template class SwigPyBuiltin, because it caused problems
when two typedef-equivalent types are wrapped as separate classes.

Now failing on refcount.cpptest.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12392 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-12 00:43:01 +00:00
Stefan Zager 8ac54d1d5e Director issues should be mostly clean now.
Refactored some type initialization out of SWIG_init.

Use __all__ attribute of module to define public interface.
This is necessary to make available symbols starting with '_'.

Now dying on li_boost_shared_ptr.  Looks like it's gonna be ugly.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12373 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-06 00:09:25 +00:00
Stefan Zager b77b64944b Static member variables are working.
Fixed some corner cases with protected members of director classes.

Now dying in director_finalizer.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12371 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-05 08:35:28 +00:00
Stefan Zager 3a86f2068f Added support for multiple inheritance. Not as hard as I feared.
Apply operator features to both the operator name, and the renamed
"__*__" method.  That's the only way to hit all corners.

Added support for %pythonnondynamic.  I believe this implementation
is more correct than the existing implementation, but I'm still
waiting for an adjudication on the behavior of the python_nondynamic
test.

Current list of unsupported features that require minor tweaks
to the test suite:

- 'this' member variable is obsolete.

- No support for reversible operator overloads (e.g., __radd__).  You
can still support this:

a = MyString("foo")
b = "bar"
c = a + b

... but you can't do this:

a = "foo"
b = MyString("bar")
c = a + b

With the tweaks, the test suite now fails on python_nondynamic.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12353 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-12-20 23:35:18 +00:00
Stefan Zager dd465f9588 Finished std::pair and std::map support.
li_std_pair_extra test fails, because the _runme.py uses the
secret 'this' member variable, which doesn't exist when the
-builtin option is used.  Seems like a flaw in the test.

Test suite now fails on li_std_string_extra, because static
member variables are not fully implemented.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12351 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-12-15 23:04:20 +00:00
Stefan Zager 8a7ad756d0 Added sequence and mapping support for builtin types.
Fixed object ownership in %pyswigbinoperator.

Test suite now fails on li_std_vector_extra.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12346 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-12-14 21:11:02 +00:00
Stefan Zager b1682d4d80 Added support for operator overrides (PyNumberMethods) and
member variable access.

test suite now croaks on inplaceadd.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12345 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-12-14 00:08:45 +00:00
Stefan Zager 399ae62561 Basic director support (passes first few director tests). Now fails on iadd_runme, because member variable support is missing.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12340 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-12-08 21:57:27 +00:00
Stefan Zager ee3a6623da First cut. Works for wrapping OpenAccess, but there's plenty
left to do.

Currently, the test suite hurls at director_stl.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12332 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-12-07 21:50:00 +00:00
William S Fulton 77b87aa919 typo fix in help message
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12288 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-11-11 19:30:44 +00:00
Olly Betts 5437d71d73 [Python] Improve error message given when a parameter of the wrong
type is passed to an overloaded method (SF#3027355).


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12229 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-27 01:16:29 +00:00
William S Fulton 1e051820ec Line/file reporting corrections for warnings: WARN_RUBY_MULTIPLE_INHERITANCE, WARN_TYPE_UNDEFINED_CLASS, WARN_MODULA3_MULTIPLE_INHERITANCE
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12225 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-21 06:07:06 +00:00
William S Fulton 95a3eb5a7d code style: fix inconsistent NULL pointer comparisons
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12137 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-06-17 23:49:12 +00:00
William S Fulton bb41eeb343 Fix potential name clashes with symbols in the Director class
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12062 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-27 20:55:24 +00:00
Haoyu Bai 2450c4b108 fix regression of Python constructor renaming introduced by py3k work
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11997 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-04-25 14:07:14 +00:00
William S Fulton a743d54665 Fix segfault when using Python's -threads options and exceptions are thrown
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11980 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-04-08 06:46:18 +00:00
William S Fulton 2b1f0a14bc merge revisions 11872:11876 from trunk to gsoc2008-cherylfoil branch - license changes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-cherylfoil@11900 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-03-05 23:43:39 +00:00
William S Fulton 1253657bb4 Add improved namespace support - the nspace feature, working for Java only at the moment.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11896 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-03-04 21:27:23 +00:00
William S Fulton cb64f65bae SWIG license change - Source moves to GPLv3
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11876 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-02-27 23:53:33 +00:00
William S Fulton f6ce153f8f Remove -dirvtable from the optimizations included by -O as it this option currently leads to memory leaks
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11872 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-02-27 15:53:21 +00:00
William S Fulton 83bd820285 Add typemaps used debugging option (-debug-tmused). Fix missing file/line numbers for typemap warnings and in the output from the -debug-tmsearch/-debug-tmused options
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11802 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-01-04 19:33:52 +00:00
William S Fulton 45518cd0d1 apply doxygen-svndiff.patch from #2763155
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-cherylfoil@11697 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-10-13 21:27:09 +00:00
William S Fulton 136bd5175a Python and Tcl - improve error message for missing constructor when the reason is because the class is abstract.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11518 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-08 22:56:10 +00:00
Olly Betts 5215d9227a [Python] Fix indentation so that we give a useful error if the
module can't be loaded.  Patch from Gaetan Lehmann in SF#2829853.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11485 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-31 12:09:25 +00:00
William S Fulton 8ec7035eee improve WARN_LANG_OVERLOAD_KEYWORD warning by giving the name of the overloaded function
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11421 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-18 22:34:33 +00:00
William S Fulton 54b87bdd7d remove extra lookup of directorout typemap
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11246 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-06-05 17:19:29 +00:00
Olly Betts 38f00d3544 [Python] Don't attempt to acquire the GIL in situations where we
know that it will already be locked.  This avoids some dead-locks
with mod_python (due to mod_python bugs which are apparently
unlikely to ever be fixed), and results in smaller wrappers which
run a little faster (in tests with Xapian on x86-64 Ubuntu 9.04,
the stripped wrapper library was 11% smaller and ran 2.7% faster).


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11192 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-04-29 09:35:58 +00:00
Haoyu Bai 5d64541c44 Fix SF#2583160. Make swig_import_helper() in shadow wrapper able to deal with the case that module already imported at other place.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11141 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-03-01 09:37:21 +00:00
William S Fulton efa11dee52 add new %begin directive for inserting code at top of wrapper file
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11133 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-02-20 07:52:24 +00:00
Haoyu Bai afd67f8c67 Fix SF#2552488: indentation adjust of %pythonappend and %pythonprepend
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11100 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-01-31 14:37:54 +00:00
Haoyu Bai be7fdab62e Fix SF#2552048. Remove the 'self' parameter in Python proxy code for static member function.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11099 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-01-31 13:38:39 +00:00
William S Fulton 5ec2d8c166 All languages now define a macro in the generated C/C++ wrapper file indicating which language is being wrapped, eg #define SWIGJAVA
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11018 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-12-30 00:38:34 +00:00
William S Fulton cc522323d7 create a common banner header for all target language specific files
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11016 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-12-29 22:56:25 +00:00
Haoyu Bai 8f84447860 Commited SF#2158938: change all SWIG symbols start with Py to a new name.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10961 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-12-03 18:43:44 +00:00
William S Fulton 1c4ec59e45 Apply patch #2143727 for Python from Serge Monkewitz to fix importing base classes when the package option is specified in %module and that module is %import'ed
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10960 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-12-02 20:21:16 +00:00
William S Fulton d26772917b minor fix to formatting in generated types table
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10956 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-11-28 23:30:45 +00:00
William S Fulton 6fb0f48935 customised ccache support: read the CCACHE_OUTFILES env variable and if exists, the names of all generated files are written to the filename specified in the env variable
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10898 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-11-03 12:51:45 +00:00
William S Fulton 04a1d9182f Add patch #2128249 from Anatoly Techtonik which corrects the C/C++ proxy class being reported for Python docstrings when %rename is used
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10897 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-11-01 23:09:26 +00:00
William S Fulton 4c6e314308 remove confusion over tab widths
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10869 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-09-18 20:21:17 +00:00
William S Fulton 061e934bbc Document the module attribute in %import and add warning to Python for when it should be used
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10866 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-09-18 14:52:52 +00:00
Jamie Kirkpatrick 83cef07b90 Multiple documentation sections are now concatted into one where there are various overloads for methods with the same name.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-cherylfoil@10844 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-09-12 11:21:40 +00:00
Jamie Kirkpatrick 01695a3128 Major refactoring: translation now takes a node and returns a translated comment if there is one.
This is to allow for situations where you need to use several nodes to create a comment, for example where there are multiple overloads for the same function but the target language doesnt support overloading: in this case we want to combine comments to explain the possible overloads.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-cherylfoil@10843 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-09-12 11:20:58 +00:00
Jamie Kirkpatrick 0db7edfa63 Progress towards a working pydoc implementation.
- Nodes are now passed to the documentation translator so that type information can be looked up and used in parameter comments.
- Class comments are now inserted as well as some method information,


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-cherylfoil@10838 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-09-12 11:17:39 +00:00
Jamie Kirkpatrick 825e67b2b0 Merged revisions 10487,10498-10499,10503-10504,10506,10508,10511,10515-10516,10518-10519,10527,10530-10531,10536-10537,10539-10552,10558-10568,10574-10580,10582,10584,10588-10589,10594,10607-10610,10616,10621,10624-10629,10633-10641,10643,10647,10649-10650,10662,10672,10676-10677,10682-10683,10714,10726-10727,10738,10743,10747,10749,10794,10801-10809,10827-10831,10834 via svnmerge from
https://swig.svn.sourceforge.net/svnroot/swig/trunk

................
  r10487 | wsfulton | 2008-05-21 23:15:52 +0100 (Wed, 21 May 2008) | 1 line
  
  Apply patch from Petr Viktorin to fix some recent regressions in CFFI/CLOS
................
  r10498 | talby | 2008-05-26 21:09:56 +0100 (Mon, 26 May 2008) | 2 lines
  
  run test cases in the Perl set by the --with-perl5 configure option.
................
  r10499 | talby | 2008-05-26 22:04:06 +0100 (Mon, 26 May 2008) | 3 lines
  
  The perl5 minherit runtime test will work better if the classes are 
  actually built under SWIGPERL.
................
  r10503 | wsfulton | 2008-05-28 10:44:37 +0100 (Wed, 28 May 2008) | 1 line
  
  Fix variable wrappers when using -proxy. Patch from Jan Jezabek
................
  r10504 | bhy | 2008-05-28 18:27:48 +0100 (Wed, 28 May 2008) | 2 lines
  
  Fixed SF #1971977:  typo in pycontainer.swg (related to -extranative option)
................
  r10506 | wsfulton | 2008-05-29 01:45:28 +0100 (Thu, 29 May 2008) | 1 line
  
  Fix variable wrappers when using -noproxy
................
  r10508 | bhy | 2008-05-30 14:53:33 +0100 (Fri, 30 May 2008) | 1 line
  
  Fixed SF #1976978, apply the macros for primitive types to std::wstring
................
  r10511 | olly | 2008-05-30 17:11:27 +0100 (Fri, 30 May 2008) | 4 lines
  
  Fix typo in handling of /*@SWIG[...]*/ comments in the scanner.  This just
  meant we were only actually looking for /*@SWI at the start of the comment, so
  was pretty harmless in practice.
................
  r10515 | wsfulton | 2008-06-02 21:10:40 +0100 (Mon, 02 Jun 2008) | 1 line
  
  Fix samename testcase for c# and java
................
  r10516 | wsfulton | 2008-06-02 21:15:39 +0100 (Mon, 02 Jun 2008) | 1 line
  
  Fix enums when using -noproxy
................
  r10518 | bhy | 2008-06-07 12:20:07 +0100 (Sat, 07 Jun 2008) | 4 lines
  
  Added a test case for keyword renaming.
  Now it works for Python in SWIG's -c++ mode,
  but in C mode it doesn't work! (you can try with make keyword_rename.ctest)
................
  r10519 | bhy | 2008-06-07 14:40:51 +0100 (Sat, 07 Jun 2008) | 1 line
  
  fixed keyword_rename.ctest tese case, caused by a mistake in Swig/naming.c
................
  r10527 | mgossage | 2008-06-17 03:57:15 +0100 (Tue, 17 Jun 2008) | 1 line
  
  [lua] bugfix 1938142 (bool& and bool* support)
................
  r10530 | wsfulton | 2008-06-19 21:02:13 +0100 (Thu, 19 Jun 2008) | 1 line
  
  Add R keyword support. Rename keywords for successful compilation of Java and C# code. More consistent keyword warnings across the different languages.
................
  r10531 | wsfulton | 2008-06-19 22:15:48 +0100 (Thu, 19 Jun 2008) | 1 line
  
  add complete list of R reserved words
................
  r10536 | wsfulton | 2008-06-21 12:35:33 +0100 (Sat, 21 Jun 2008) | 1 line
  
  better terminology for static types
................
  r10537 | wsfulton | 2008-06-21 12:42:48 +0100 (Sat, 21 Jun 2008) | 1 line
  
  remove raise as keyword test- it conflicts with _raise in LIBCMT on windows
................
  r10539 | wsfulton | 2008-06-21 16:21:29 +0100 (Sat, 21 Jun 2008) | 1 line
  
  Lua example warning removal fixes for vc++
................
  r10540 | wsfulton | 2008-06-21 16:23:02 +0100 (Sat, 21 Jun 2008) | 1 line
  
  Remove some vc++ /W4 warnings
................
  r10541 | wsfulton | 2008-06-21 17:04:55 +0100 (Sat, 21 Jun 2008) | 1 line
  
  minor vc++ /W4 warning fixes
................
  r10542 | wsfulton | 2008-06-21 20:07:51 +0100 (Sat, 21 Jun 2008) | 1 line
  
  'byte' is already used in Ruby on windows, so use another keyword
................
  r10543 | wsfulton | 2008-06-21 21:45:32 +0100 (Sat, 21 Jun 2008) | 1 line
  
  Fix crashing in the Ruby reject method in the STL wrappers
................
  r10544 | wsfulton | 2008-06-21 21:48:28 +0100 (Sat, 21 Jun 2008) | 1 line
  
  Fix crashing in the Ruby reject method in the STL wrappers
................
  r10545 | wsfulton | 2008-06-21 21:49:10 +0100 (Sat, 21 Jun 2008) | 1 line
  
  remove unnecessary variable int the char **STRING_ARRAY out typemap
................
  r10546 | wsfulton | 2008-06-21 22:07:49 +0100 (Sat, 21 Jun 2008) | 1 line
  
  Fix Ruby C++ example dependencies in dsp files
................
  r10547 | wsfulton | 2008-06-21 23:25:36 +0100 (Sat, 21 Jun 2008) | 1 line
  
  Fix unused parameter warnings in python when using gcc's -W -Wall options
................
  r10548 | wsfulton | 2008-06-21 23:26:35 +0100 (Sat, 21 Jun 2008) | 1 line
  
  Fix virtual destructor
................
  r10549 | wsfulton | 2008-06-22 00:25:20 +0100 (Sun, 22 Jun 2008) | 1 line
  
  various warning fixes
................
  r10550 | wsfulton | 2008-06-22 01:09:11 +0100 (Sun, 22 Jun 2008) | 1 line
  
  Another fix for the JVM hanging on exit problem when using directors
................
  r10551 | wsfulton | 2008-06-22 01:09:51 +0100 (Sun, 22 Jun 2008) | 1 line
  
  documentation sections update
................
  r10552 | wsfulton | 2008-06-22 01:18:10 +0100 (Sun, 22 Jun 2008) | 1 line
  
  more docs on defining macros for the thread hanging problem
................
  r10558 | wsfulton | 2008-06-22 22:30:20 +0100 (Sun, 22 Jun 2008) | 1 line
  
  fix unused parms in last commit for C code
................
  r10559 | wsfulton | 2008-06-22 23:12:43 +0100 (Sun, 22 Jun 2008) | 1 line
  
  Suppress unused methods warning for VC++
................
  r10560 | wsfulton | 2008-06-23 21:26:07 +0100 (Mon, 23 Jun 2008) | 1 line
  
  fix partialcheck-test-suite and parallel make for r, chicken, tcl and php
................
  r10561 | wsfulton | 2008-06-23 21:39:41 +0100 (Mon, 23 Jun 2008) | 1 line
  
  correct message display when running the partialcheck-test-suite make target
................
  r10562 | wsfulton | 2008-06-23 22:14:53 +0100 (Mon, 23 Jun 2008) | 1 line
  
  fix typo
................
  r10563 | olly | 2008-06-23 22:23:54 +0100 (Mon, 23 Jun 2008) | 3 lines
  
  Fix bad use of Python API (untested, since I can't even compile this code on
  x86-64!)
................
  r10564 | olly | 2008-06-23 23:58:03 +0100 (Mon, 23 Jun 2008) | 3 lines
  
  [PHP] Fix segfault when wrapping a non-class function marked with
  %newobject (testcase char_strings).
................
  r10565 | olly | 2008-06-24 01:27:34 +0100 (Tue, 24 Jun 2008) | 3 lines
  
  [PHP] Fix assertion failure when handling %typemap(in,numinputs=0)
  (testcase ignore_parameter).
................
  r10566 | olly | 2008-06-24 01:33:08 +0100 (Tue, 24 Jun 2008) | 2 lines
  
  [PHP] Fix typemap_namespace.i to not try to copy a non-existent typemap.
................
  r10567 | olly | 2008-06-24 01:41:07 +0100 (Tue, 24 Jun 2008) | 3 lines
  
  Clean up dead and unused code in SwigToPhpType(), and rename to
  GetShadowReturnType().
................
  r10568 | olly | 2008-06-24 01:42:29 +0100 (Tue, 24 Jun 2008) | 2 lines
  
  Fix cosmetic typo in string constant.
................
  r10574 | wsfulton | 2008-06-24 21:10:28 +0100 (Tue, 24 Jun 2008) | 1 line
  
  zap last entry
................
  r10575 | wsfulton | 2008-06-24 21:11:46 +0100 (Tue, 24 Jun 2008) | 1 line
  
  variable name changes to remove php keywords
................
  r10576 | wsfulton | 2008-06-24 21:12:08 +0100 (Tue, 24 Jun 2008) | 1 line
  
  variable name hiding fix
................
  r10577 | wsfulton | 2008-06-24 21:12:43 +0100 (Tue, 24 Jun 2008) | 1 line
  
  More info about numobjects added
................
  r10578 | wsfulton | 2008-06-24 21:13:41 +0100 (Tue, 24 Jun 2008) | 1 line
  
  update for 1.3.36 release
................
  r10579 | wsfulton | 2008-06-24 22:48:46 +0100 (Tue, 24 Jun 2008) | 1 line
  
  remove deprecated -c commandline option (runtime library generation)
................
  r10580 | wsfulton | 2008-06-24 22:53:12 +0100 (Tue, 24 Jun 2008) | 1 line
  
  correct comment about deprecated option
................
  r10582 | wsfulton | 2008-06-25 00:00:27 +0100 (Wed, 25 Jun 2008) | 1 line
  
  use rsync and ssh to upload releases to SourceForge as ftp no longer works
................
  r10584 | wsfulton | 2008-06-25 00:24:48 +0100 (Wed, 25 Jun 2008) | 1 line
  
  correction for 1.3.36
................
  r10588 | wsfulton | 2008-06-25 01:16:04 +0100 (Wed, 25 Jun 2008) | 1 line
  
  section update
................
  r10589 | wsfulton | 2008-06-25 01:16:40 +0100 (Wed, 25 Jun 2008) | 1 line
  
  bump version to 1.3.37
................
  r10594 | wsfulton | 2008-06-26 19:33:06 +0100 (Thu, 26 Jun 2008) | 1 line
  
  correct typo in first entry about %fragment
................
  r10607 | wsfulton | 2008-06-29 01:19:05 +0100 (Sun, 29 Jun 2008) | 1 line
  
  fix some potential null pointer usage as reported by CoveriCoverity Prevent
................
  r10608 | wsfulton | 2008-06-29 01:50:27 +0100 (Sun, 29 Jun 2008) | 1 line
  
  fix potential null pointer usage as reported by Coverity Prevent
................
  r10609 | wsfulton | 2008-06-29 10:57:41 +0100 (Sun, 29 Jun 2008) | 1 line
  
  make life easier for svn status updates as everyone has different autotool versions installed - use svn:ignore on config.sub and config.guess
................
  r10610 | wsfulton | 2008-06-29 11:08:14 +0100 (Sun, 29 Jun 2008) | 1 line
  
  make life easier for svn status updates as everyone has different autotool versions installed - use svn:ignore on config.sub and config.guess
................
  r10616 | talby | 2008-07-01 00:41:27 +0100 (Tue, 01 Jul 2008) | 2 lines
  
  Hopefully this provides more portable values for Infinity and NaN in Perl.
................
  r10621 | wsfulton | 2008-07-01 23:02:14 +0100 (Tue, 01 Jul 2008) | 1 line
  
  update old commandline option
................
  r10624 | olly | 2008-07-02 04:17:46 +0100 (Wed, 02 Jul 2008) | 5 lines
  
  [Python] Import the C extension differently for Python 2.6 and
  later so that an implicit relative import doesn't produce a
  deprecation warning for 2.6 and a failure for 2.7 and later.
  Patch from Richard Boulton in SF#2008229.
................
  r10625 | bhy | 2008-07-02 05:56:11 +0100 (Wed, 02 Jul 2008) | 1 line
  
  fix the relative import patch by try both relative and absolute import
................
  r10626 | olly | 2008-07-02 06:55:18 +0100 (Wed, 02 Jul 2008) | 4 lines
  
  [PHP4] Support for PHP4 has been removed.  The PHP developers are
  no longer making new PHP4 releases, and won't even be patching
  critical security issues after 2008-08-08.
................
  r10627 | bhy | 2008-07-02 07:06:56 +0100 (Wed, 02 Jul 2008) | 1 line
  
  fix the previous commit -- new approach using imp module
................
  r10628 | bhy | 2008-07-02 07:29:15 +0100 (Wed, 02 Jul 2008) | 1 line
  
  minor fix on relative import: close fp if exception occured during imp.find_module
................
  r10629 | bhy | 2008-07-02 08:08:00 +0100 (Wed, 02 Jul 2008) | 1 line
  
  reconstruct the relative import, now the generated code looks better
................
  r10633 | olly | 2008-07-03 01:09:56 +0100 (Thu, 03 Jul 2008) | 9 lines
  
  WARN_* constants are user visible, so keep existing WARN_PHP4_* for
  backward compatibility, but add preferred forms WARN_PHP_* and use
  these ourselves.
  
  Rename Lib/php4 to Lib/php, Source/Modules/php4.cxx to Source/Modules/php.cxx.
   
  Add typemaps for const reference so Examples/test-suite/apply_signed_char.i
  works.
................
  r10634 | olly | 2008-07-03 01:12:58 +0100 (Thu, 03 Jul 2008) | 2 lines
  
  Remove file added in error.
................
  r10635 | olly | 2008-07-03 01:37:38 +0100 (Thu, 03 Jul 2008) | 2 lines
  
  Rename php4*.swg to php*.swg.
................
  r10636 | olly | 2008-07-03 02:13:51 +0100 (Thu, 03 Jul 2008) | 2 lines
  
  Update wrt PHP4.
................
  r10637 | olly | 2008-07-03 03:32:11 +0100 (Thu, 03 Jul 2008) | 4 lines
  
  [PHP] The deprecated command line option "-phpfull" has been
  removed.  We recommend building your extension as a dynamically
  loadable module.
................
  r10638 | olly | 2008-07-03 03:32:41 +0100 (Thu, 03 Jul 2008) | 2 lines
  
  Fix version number
................
  r10639 | olly | 2008-07-03 07:04:24 +0100 (Thu, 03 Jul 2008) | 2 lines
  
  Make t_output_helper() static.
................
  r10640 | olly | 2008-07-03 07:05:34 +0100 (Thu, 03 Jul 2008) | 2 lines
  
  Make testcase li_typemaps work for PHP.
................
  r10641 | olly | 2008-07-03 10:12:16 +0100 (Thu, 03 Jul 2008) | 2 lines
  
  Fix check::classname() to compare case-insensitively and not try to interpolate objects into strings.
................
  r10643 | olly | 2008-07-03 23:00:01 +0100 (Thu, 03 Jul 2008) | 4 lines
  
  The operator& trick in allowexcept.i doesn't work for SWIG/PHP because the
  generated code takes the address of the variable in the code in the "vinit"
  section.  So comment out the private operator& for PHP.
................
  r10647 | olly | 2008-07-04 00:55:33 +0100 (Fri, 04 Jul 2008) | 2 lines
  
  [PHP] The SWIG cdata.i library module is now supported.
................
  r10649 | olly | 2008-07-04 02:02:22 +0100 (Fri, 04 Jul 2008) | 4 lines
  
  [PHP] The deprecated command line option "-make" has been removed.  
  Searches on Google codesearch suggest that nobody is using it now
  anyway.
................
  r10650 | olly | 2008-07-04 02:22:11 +0100 (Fri, 04 Jul 2008) | 4 lines
  
  [PHP] For std_vector.i and std_map.i, rename empty() to is_empty()
  since "empty" is a PHP reserved word.  Based of patch from Mark Klein
  in SF#1943417.
................
  r10662 | wsfulton | 2008-07-14 22:09:23 +0100 (Mon, 14 Jul 2008) | 1 line
  
  Fix director typemaps for pointers so that NULL pointers are correctly marshalled to C#/Java null in director methods
................
  r10672 | olly | 2008-07-17 02:17:08 +0100 (Thu, 17 Jul 2008) | 2 lines
  
  Fix a typo; improve wording.
................
  r10676 | wsfulton | 2008-07-17 22:05:49 +0100 (Thu, 17 Jul 2008) | 1 line
  
  SF #2019156 Configuring with --without-octave or --without-alllang did not disable octave.
................
  r10677 | wsfulton | 2008-07-17 22:08:22 +0100 (Thu, 17 Jul 2008) | 1 line
  
  tidy output after detecting X11 headers
................
  r10682 | wsfulton | 2008-07-19 19:08:06 +0100 (Sat, 19 Jul 2008) | 1 line
  
  a bit more on pgcpp
................
  r10683 | wsfulton | 2008-07-19 23:45:54 +0100 (Sat, 19 Jul 2008) | 1 line
  
  Fix building of Tcl examples/test-suite on Mac OSX
................
  r10714 | olly | 2008-07-27 13:51:16 +0100 (Sun, 27 Jul 2008) | 2 lines
  
  Fix "can can" typo in docs (SF#2026756)
................
  r10726 | wuzzeb | 2008-08-02 09:28:02 +0100 (Sat, 02 Aug 2008) | 1 line
  
  Commit patch 2019314
................
  r10727 | wuzzeb | 2008-08-02 09:49:43 +0100 (Sat, 02 Aug 2008) | 1 line
  
  add assert.h to fix chicken build of external runtime (ext_test testsuite)
................
  r10738 | talby | 2008-08-07 07:28:13 +0100 (Thu, 07 Aug 2008) | 2 lines
  
  hoist globals to local scope where trival.
................
  r10743 | talby | 2008-08-08 04:10:55 +0100 (Fri, 08 Aug 2008) | 2 lines
  
  initial steps to clean up perl5 class methods (primarily constructors).
................
  r10747 | talby | 2008-08-09 05:08:26 +0100 (Sat, 09 Aug 2008) | 2 lines
  
  moves perl space constructor fixups into wrapper code.
................
  r10749 | talby | 2008-08-10 00:57:55 +0100 (Sun, 10 Aug 2008) | 2 lines
  
  usage_func() fix + CHANGES.current entry to explain my past few commits.
................
  r10794 | talby | 2008-08-19 08:09:29 +0100 (Tue, 19 Aug 2008) | 3 lines
  
  rollback 10737:10749, this work is better left on a branch until it is 
  in support a significant feature enhancement.
................
  r10801 | drjoe | 2008-08-31 17:07:43 +0100 (Sun, 31 Aug 2008) | 2 lines
  
  change Rf_warning to warning.  Looks like a typo
................
  r10802 | wsfulton | 2008-09-01 20:59:23 +0100 (Mon, 01 Sep 2008) | 1 line
  
  Fix ruby detection problem breaking configure
................
  r10803 | wsfulton | 2008-09-01 21:00:28 +0100 (Mon, 01 Sep 2008) | 1 line
  
  Fix another perl global namespace pollution
................
  r10804 | wsfulton | 2008-09-01 21:32:53 +0100 (Mon, 01 Sep 2008) | 1 line
  
  Fix array bounds checking in C# std::vector wrappers
................
  r10805 | wsfulton | 2008-09-01 21:34:49 +0100 (Mon, 01 Sep 2008) | 1 line
  
  fix runtime problem in Ruby std_vector example
................
  r10806 | wsfulton | 2008-09-01 21:42:40 +0100 (Mon, 01 Sep 2008) | 1 line
  
  Fix portability problem using /dev/null
................
  r10807 | wsfulton | 2008-09-01 22:46:41 +0100 (Mon, 01 Sep 2008) | 1 line
  
  patch #2079381 submitted by Boris Smilga - constant exprs put into no-eval context in DEFCENUM
................
  r10808 | wsfulton | 2008-09-02 21:56:52 +0100 (Tue, 02 Sep 2008) | 1 line
  
  Add new terminator attribute for the csin typemap for C#
................
  r10809 | wsfulton | 2008-09-03 00:01:37 +0100 (Wed, 03 Sep 2008) | 1 line
  
  Fix #1988296 - Multiple module director linking issue
................
  r10827 | richardb | 2008-09-10 11:08:21 +0100 (Wed, 10 Sep 2008) | 6 lines
  
  [Python] Commit patch #2089149: Director exception handling mangles
  returned exception.  Exceptions raised by Python code in directors
  are now passed through to the caller without change.  Also, remove
  the ": " prefix which used to be added to other director exceptions
  (eg, those due to incorrect return types).
................
  r10828 | bhy | 2008-09-10 11:45:33 +0100 (Wed, 10 Sep 2008) | 3 lines
  
  Initialized merge tracking via "svnmerge" with revisions "1-10827" from 
  https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-bhy
................
  r10829 | bhy | 2008-09-10 12:04:09 +0100 (Wed, 10 Sep 2008) | 4 lines
  
  Removed merge tracking for "svnmerge" for 
  https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-bhy
  (Undo the init due to user error)
................
  r10830 | bhy | 2008-09-10 12:08:16 +0100 (Wed, 10 Sep 2008) | 3 lines
  
  Initialized merge tracking via "svnmerge" with revisions "1-10403" from 
  https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-bhy
................
  r10831 | bhy | 2008-09-10 12:51:12 +0100 (Wed, 10 Sep 2008) | 11 lines
  
  (Still trying to set right properity to get svnmerge work...)
  Recorded merge of revisions 10404 via svnmerge from 
  https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-bhy
  
  ........
    r10404 | bhy | 2008-05-01 08:35:49 +0800 (Thu, 01 May 2008) | 5 lines
    
    Start of gsoc2008-bhy branch. This is a branch for Haoyu Bai's Python 3.0 backend project.
    Some file already modified since a little of work already done when starting the branch. 
  ........
................
  r10834 | bhy | 2008-09-11 18:18:07 +0100 (Thu, 11 Sep 2008) | 8 lines
  
  Merged the Python 3.0 support branch. The merging progress is not so smooth, so hope this commit won't make anything broken.
  
  This is the (incomplemete) log produced by svnmerge.py:
  
  Merged revisions 10405-10409,10420-10422,10426,10438,10445,10451,10454-10465,10467,10473-10475,10485,10488-10489,10493-10495,10497,10509-10510,10513-10514,10517,10520,10525,10528-10529,10533-10535,10554-10557,10570,10573,10593,10614,10666-10669,10673,10678,10687,10690,10704-10706,10731,10744,10750-10752,10755,10759,10770,10775-10776,10813,10819 via svnmerge from 
  https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-bhy
................


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-cherylfoil@10837 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-09-12 10:51:51 +00:00
Haoyu Bai 3d8ddfc442 Merged the Python 3.0 support branch. The merging progress is not so smooth, so hope this commit won't make anything broken.
This is the (incomplemete) log produced by svnmerge.py:

Merged revisions 10405-10409,10420-10422,10426,10438,10445,10451,10454-10465,10467,10473-10475,10485,10488-10489,10493-10495,10497,10509-10510,10513-10514,10517,10520,10525,10528-10529,10533-10535,10554-10557,10570,10573,10593,10614,10666-10669,10673,10678,10687,10690,10704-10706,10731,10744,10750-10752,10755,10759,10770,10775-10776,10813,10819 via svnmerge from 
https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-bhy



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10834 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-09-11 17:18:07 +00:00
Haoyu Bai 9fc127d68b reconstruct the relative import, now the generated code looks better
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10629 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-07-02 07:08:00 +00:00
Haoyu Bai 4d3e448b38 minor fix on relative import: close fp if exception occured during imp.find_module
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10628 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-07-02 06:29:15 +00:00
Haoyu Bai 9fbab46bd4 fix the previous commit -- new approach using imp module
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10627 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-07-02 06:06:56 +00:00
Haoyu Bai 1f2c29342f fix the relative import patch by try both relative and absolute import
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10625 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-07-02 04:56:11 +00:00
Olly Betts 31926ad905 [Python] Import the C extension differently for Python 2.6 and
later so that an implicit relative import doesn't produce a
deprecation warning for 2.6 and a failure for 2.7 and later.
Patch from Richard Boulton in SF#2008229.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10624 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-07-02 03:17:46 +00:00
William S Fulton 49675199f4 Remove some vc++ /W4 warnings
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10540 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-06-21 15:23:02 +00:00
William S Fulton dfcb1640bf Remove old swig-1.1 Swig_typemap_lookup function. Rename Swig_typemap_lookup_new() to Swig_typemap_lookup()
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10453 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-05-15 21:18:44 +00:00
William S Fulton 336b50b43d Add the optimal attribute to the out typemap for more optimal code generation when returning objects by value
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10450 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-05-14 22:12:31 +00:00
William S Fulton 7c6f8dafa7 Apply patch #1924524 from Casey Raymondson which ensures the 'No constructor defined' message is displayed when attempting to call a constructor on a class that doesn't have a constructor wrapper, eg if the C++ class is abstract.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10323 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-03-26 20:43:45 +00:00
William S Fulton 2bef4d6b0c Set wrap:name for variables for use in special variable
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10270 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-02-27 15:29:55 +00:00
William S Fulton b67e0a28a3 Fixes for $wrapname to work in %exception
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10265 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-02-25 22:07:28 +00:00
William S Fulton f39242fa92 Complete the Python support for shared_ptr mainly for derived classes. This includes the smartptr feature for overriding the class registration function and shared_ptr typemaps
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10236 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-02-09 12:25:41 +00:00
William S Fulton 5ad2a3ab0c Fix formatting of error messages for overloaded functions that use templates
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10216 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-01-21 22:31:37 +00:00
William S Fulton 3ac369d8d0 Improve output formatting of generated code for overloaded methods
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10215 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-01-21 22:20:30 +00:00
William S Fulton 1be894e058 Fix PyArg_ParseTuple for swigregister method
Fix some typos in -help

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10201 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-01-12 22:37:11 +00:00
William S Fulton e49c07014d Correct usage of Py_ssize_t
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10040 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-25 22:33:20 +00:00
William S Fulton fe042d2ebc Replace cvs $Header$ with svn $Id$
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10003 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-17 21:42:11 +00:00
Olly Betts cb4c23fde1 [python] Split potentially long string literals to avoid hitting
MSVC's low fixed limit on string literal length - patch from
SF#1723770, also reported as SF#1630855.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9940 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-09-18 00:50:20 +00:00
Olly Betts f08000de17 [Python]
Split docstrings into separate string literals at each newline when
generating C/C++ wrapper code (the C/C++ compiler will just combine
the back into a single string literal).  This avoids MSVC
complaining that the strings are too long (problem reported by
Bo Peng on the mailing list).


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9841 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-29 00:57:46 +00:00
Olly Betts af2d15d2a5 [Python]
Escape backslashes in docstrings.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9840 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-27 23:57:34 +00:00
Olly Betts 26e8cc0797 [Python]
Fix autodoc generation of enums to be more consistent with how the
enums are wrapped - patch #1697226 from Josh Cherry.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9839 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-26 15:00:58 +00:00
Olly Betts 8094f2c86f Remove unused trailing `0' parameter in call to Printf.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9796 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-08 22:37:21 +00:00
Olly Betts 898e5f7f3d [Python] Fix lack of generation of docstrings when -O is used.
Also, fix generation of docstrings containing a double quote
character.  Patch from Richard Boulton in bug#1700146.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9684 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-04-20 01:16:31 +00:00
Dave Beazley b00cef436b API cleanup (Parms)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9633 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-01-10 23:43:07 +00:00
William S Fulton c4761132ac %extend for static member varibles work in progress ... static member variable and global variable wrapper names changed so that they don't clash with the user supplied %extend function name
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9606 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-12-05 22:10:56 +00:00
Luigi Ballabio bfa1582e08 Recommit of alternate fix for bug #1578346 (this time without formatting mess)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9568 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-11-16 10:26:03 +00:00
William S Fulton 97b1fbaa02 -fakeversion appears in generated files. Made comment with version number at top of generated files consistent.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9563 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-11-15 23:45:47 +00:00
William S Fulton c2a2108738 reverting to previous version to fix formatting mess
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9561 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-11-15 23:11:56 +00:00
Luigi Ballabio 31d299384e Alternate fix for bug #1578346 (the previous one broke Python properties in modern classes)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9560 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-11-15 17:26:25 +00:00
William S Fulton fd3ee92b41 Path #1578346 - Python exceptions fail
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9544 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-11-12 01:21:22 +00:00