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
William S Fulton
0b0b568515
Cosmetic - comments added
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12654 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-05 06:09:55 +00:00
Ian Lance Taylor
b8d2e9f8f6
Initialize a couple of members accidentally left uninitialized.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12647 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-30 06:02:28 +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
David Nadlinger
1dcc81fced
[D] nspace: Correctly generate identifiers for base classes when
...
not in split proxy mode.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12641 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-23 13:34:08 +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
David Nadlinger
f9def91f30
[D] Ported r12557 (char enum values).
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12630 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-10 16:10:42 +00:00
David Nadlinger
6c0f3f1a7d
[D] Fixed referencing types in the root namespace when not in split proxy mode.
...
Previously, invalid code would be generated for cases like the following if the nspace feature was active, but the split proxy mode not:
---
struct Foo {};
namespace Ns {
struct Bar {
void bar(const Foo &f) {}
};
}
---
Thanks to Johannes Pfau for reporting this.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12629 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-10 14:02:52 +00:00
David Nadlinger
3af2e27a3f
[D] Fixed qualified name handling, broken since r12588.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12628 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-10 14:02:29 +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
f759999f40
Merged trunk through revision 12591
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12592 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-03 03:14:19 +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
William S Fulton
f24d1b99b1
Add in missing wrappers for friend functions for some target languages
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12588 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-01 23:06:40 +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
William S Fulton
24d695a7a1
Apply patch #3248280 which adds better error messages when the incorrect number or type of arguments are passed to overloaded methods.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12564 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-29 19:15:19 +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
William S Fulton
b57a12fa21
Fix for a few affected target languages since last commit changed the way enum values that are type char are handled.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12558 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-26 23:25:14 +00:00
William S Fulton
b13ec94386
SF bug #3195112 - fix wrapping of enums that are type char
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12557 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-26 15:28:31 +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
David Nadlinger
7709e0303a
[D] Added -d2 switch to usage information.
...
Previously, it was documented in the manual, but not present in the command line usage text.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12545 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-16 17:20:45 +00:00
David Nadlinger
ac375e90a8
[D] Whitespace cleanup.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12544 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-16 17:20:21 +00:00
Ian Lance Taylor
e63bc0ab13
Don't emit unused "fail" label.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12543 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-16 14:06:03 +00:00
Olly Betts
72fc8be46c
[PHP] Fix handling of overloaded methods/functions where some
...
return void and others don't - whether this worked or not depended
on the order they were encountered in (SF#3208299).
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12539 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-14 12:33:56 +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
David Nadlinger
ce6516fb4c
[D] nspace support.
...
As for C# and Java, this doesn't work for free functions/variables yet.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12534 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-13 00:32:26 +00:00
David Nadlinger
a63cde3827
[D] Removed "-noproxy" switch from usage text.
...
I forgot to remove it from the list when I stripped the (undocumented and untested) code paths for it, which was even before the merge to trunk.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12533 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-13 00:31:13 +00:00
David Nadlinger
fb538c1b5b
[D] Avoid implicit cast warning when building for x86_64.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12532 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-13 00:30:51 +00:00
William S Fulton
c8b89bd075
Fix partial overloading warning messages appearing
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12527 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-11 22:36:59 +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
b69b793d8e
Better consistency in usage display
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12524 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-09 21:42:38 +00:00
Olly Betts
24053d7789
[PHP] Don't use zend_error_noreturn() for cases where the function
...
returns void - now this issue can only matter if you have a function
or method which is directed and returns non-void.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12523 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-07 23:05:01 +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
a984b01cc5
Remove unnecessary header, which bizarrely broke the mingw build on linux
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12506 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-20 20:18:37 +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
Ian Lance Taylor
a1c931f0a3
For Go: Recognize the SWIG varargs type.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12499 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-20 05:55:05 +00:00