Olly Betts
83cc1f6a3e
[Python] Fix some warnings when compiling generated wrappers with
...
certain GCC warning options (Debian bug #650246 ).
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12852 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-11-29 05:31:37 +00:00
Stefan Zager
959fdf2053
Bug 3440044
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12842 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-11-23 06:34:02 +00:00
Stefan Zager
2bf6de71b8
bug 3429388: python unsigned integer handling on 32-bit architectures.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12835 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-11-05 03:35:03 +00:00
William S Fulton
30206f975c
Fix constructors in named typedef class declarations
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12784 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-08-25 19:27:38 +00:00
Stefan Zager
86e1051a8b
Fixed memory leak with --builtin (bug 3385089)
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12782 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-08-22 23:33:17 +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
e167400a29
Fixed issue from swig-user 6/27/11.
...
Support code in std_map.i needs all the template parameters that std::map takes,
even the default ones (Compare, Allocator).
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12759 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-07-15 18:49:32 +00:00
Stefan Zager
3cb76bb45e
Slight tweak to output typemap for int
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12738 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-06-11 05:49:49 +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
Stefan Zager
50425dc95e
For all long integer types, use PyLong_From* rather than PyInt_From*
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12732 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-06-03 18:42:38 +00:00
Olly Betts
75a317d746
Fix typo in UEH message
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12720 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-27 13:57:42 +00:00
William S Fulton
ef1546a287
cosmetic - cleanup
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12664 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-14 00:10:10 +00:00
William S Fulton
34e7c82631
Remove a compiler warning for builtin
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12662 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-13 05:58:58 +00:00
William S Fulton
1aa65e2220
PyVarObject_HEAD_INIT to conform to C standard - pointers cannot be used in static initializers
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12661 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-12 21:07:57 +00:00
William S Fulton
63f21af8d0
PyVarObject_HEAD_INIT to conform to C standard - pointers cannot be used in static initializers
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12660 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-12 20:20:36 +00:00
Stefan Zager
a52612f845
Fixed PyGetSetDescr for python3.2.
...
Fixed memory management in special_variable_macros test.
Don't define asdict() for multimap.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12659 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-08 06:54:21 +00:00
Stefan Zager
6bd724dbf9
Added asdict() method to convert std::map to a python dict.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12646 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-29 23:26:55 +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
4b9ef9bc99
Bug 1498929: Access to member fields of map elements.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12643 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-25 21:12:33 +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
fd666c1440
new %import test for vector
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12633 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-11 21:28:06 +00:00
William S Fulton
512cf3d12d
Work around anti-aliasing warning/problem with gcc
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12632 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-11 19:22:45 +00:00
William S Fulton
caa055b7fb
Remove C++ header breaking C tests
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12626 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-10 00:29:36 +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
13527a79b7
Fix Sun Studio warnings
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12624 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-09 23:52:38 +00:00
William S Fulton
0fea2dd2b5
Revert non-cosmetic change from previous checkin
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12623 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-09 23:52:03 +00:00
William S Fulton
f1234aae42
Cosmetics - Fix bracket matching
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12622 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-09 23:48:19 +00:00
Stefan Zager
17af467132
Fix for bug #3057804 : migrate PyCObject to PyCapsule.
...
Other misc. fixes for python3.2, mostly dealing with changed
interfaces to python functions.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12620 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-09 22:07:22 +00:00
Stefan Zager
7a0726c8b6
Fix ISO C90 errors.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12619 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-09 04:59:16 +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
33401e1721
More python builtin warning suppression
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12611 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-05 21:16:05 +00:00
William S Fulton
070893434b
Cosmetic formatting in generated code
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12610 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-05 20:59:24 +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
96ec495858
Fix compiler warnings about uninitialized members.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12607 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-04 07:11:02 +00:00
William S Fulton
81b3d4433d
Fix warning in wrappers (Python > 3.0) - SF# 3239071
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12606 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-04 06:38:14 +00:00
William S Fulton
71be2441c2
Fix C python < 2.5 wrappers
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12605 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-03 20:02:08 +00:00
William S Fulton
87506db48f
VC++ warning fixes for python builtin
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12602 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-03 18:40:44 +00:00
William S Fulton
3eff8232d4
Fix Python C wrapper compilation
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12600 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-03 18:11:39 +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
William S Fulton
960b503a72
Python warning fixes for gcc -Wall -Wextra
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12584 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-01 06:46:14 +00:00
William S Fulton
a46e1f6c31
unused warning fix
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12581 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-31 20:30:13 +00:00
Stefan Zager
6cecfe4fcf
Added documentation about tp_richcompare.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12578 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-31 04:12:29 +00:00
Stefan Zager
e43d328c61
Eliminate -Wformat compiler warning.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12575 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-30 21:41:59 +00:00
Stefan Zager
99dc5893d8
Style fixes, and switch %U to %S
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12573 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-30 19:17:54 +00:00
Stefan Zager
0aa8729d50
Added more documentation of -builtin.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12571 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-30 07:59:52 +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
0554313887
Treat None as a Python keyword
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12542 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-16 07:39:17 +00:00