Commit graph

272 commits

Author SHA1 Message Date
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
William S Fulton
b02017c658 fix potential null pointer usage as reported by Coverity Prevent
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10608 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-06-29 00:50:27 +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
Olly Betts
eb50e9c4b9 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.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10511 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-05-30 16:11:27 +00:00
William S Fulton
9976dc9d75 Add allprotected mode for wrapping protected members when using directors
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10381 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-04-20 20:41:01 +00:00
William S Fulton
c47f473b3c fix code comment
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10239 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-02-09 12:39:29 +00:00
William S Fulton
a4e2ca520f Add support for the optional noblock attribute for all features. It works the same as it does for typemaps removing {} braces.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10234 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-02-09 11:57:36 +00:00
William S Fulton
629aae375c Additions to %types so that a user can specify the code to go into the casting / conversion function
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10222 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-01-31 22:45:59 +00:00
Olly Betts
7b89801c80 Fix "declarations mixed with code" warning.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10197 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-12-22 18:36:06 +00:00
William S Fulton
b79ebf39fa Fix #1819847 %template with just one default template parameter
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10189 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-12-12 19:00:15 +00:00
William S Fulton
8f09d00bb0 Fix template template parameters with default arguments
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10179 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-12-06 22:35:43 +00:00
Dave Beazley
3fef3e12bc Fixed bug in the C scanner related to ignored backslash characters. This addresses a problem in 1.3.32 reported by Bill Spotz.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10154 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-11-20 16:36:37 +00:00
William S Fulton
1fce5e0454 remove C++ usage in C file
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9920 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-08-31 22:06:23 +00:00
John Lenz
fb51964d01 Fix a bunch of minor bugs found by Coverity scanner
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9889 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-08-10 02:55:27 +00:00
Olly Betts
fc66fff262 Fix reporting of filenames in errors after %include (patch from
Leigh Smith in #1731040; also reported as #1699940).


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9847 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-06-05 17:48:16 +00:00
William S Fulton
3e5f30c94f conversion operator %rename improvements - the exact operator name must be specified now, rather than a fully qualified operator name
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9837 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-26 00:06:45 +00:00
Olly Betts
07ae5a2aca Don't treat `restrict' as a reserved identifier in C++ mode.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9674 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-04-16 16:42:00 +00:00
William S Fulton
71c5f58bb3 Fix #1538522 and #1338527, forward templated class declarations without a name for the templated class parameters, such as: template <typename, class> class X;
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9645 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-01-25 23:50:04 +00:00
Dave Beazley
b92d8e5cff Major overhaul of C/C++ scanner API. Unified tokenizing code so that tokens are scanned by a common code base
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9639 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-01-12 19:01:40 +00:00
Dave Beazley
ff41049b1c Eliminated use of swigkeys.h/.c files.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9632 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-01-03 20:58:19 +00:00
Dave Beazley
c12550e4ad API cleanup. Documentation
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9631 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-01-03 05:23:20 +00:00
Dave Beazley
52dcbb9001 API cleanup
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9630 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-01-02 21:17:19 +00:00
Dave Beazley
264b7dff90 API cleanup. Documentation.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9629 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-12-30 18:27:47 +00:00
Dave Beazley
8a9b2cbdb1 Changed Header to Id
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9610 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-12-05 22:14:31 +00:00
John Lenz
6dda6f8321 Remove cvsignore files: this is stored on svn:igonre property now
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9593 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-12-03 08:28:42 +00:00
William S Fulton
aa04c4c057 beautify/format source code with gnu indent
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9505 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-11-01 23:54:54 +00:00
William S Fulton
d102ce79b2 fix include within a structure - #1162194
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9423 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-10-06 23:02:45 +00:00
Olly Betts
07c40f5f75 Back out fix for #1474463 since the problems the fix causes are worse than
the problem fixed.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9398 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-10-04 04:57:12 +00:00
Olly Betts
eebc219854 Use isxdigit().
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9374 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-28 06:45:46 +00:00
Olly Betts
cf52954bbb Use SWIG_GE, SWIG_LE, etc instead of >=, <= since the latter cause
problems when used as template parameters.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9366 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-26 07:52:24 +00:00
William S Fulton
ec17f62e04 fix virtual operators #1056100
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9358 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-25 20:18:30 +00:00
Olly Betts
cc52ebad47 Fix handle of constant expressions containing character literals (e.g. 'x').
Fixes bug #1474463.

Fix type of result of << and >> to match C rules (the type depends only on
the left argument).


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9354 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-24 23:39:30 +00:00
Olly Betts
859a8beb79 A few comment tweaks.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9348 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-24 17:33:32 +00:00
Olly Betts
9a6ebd179d Remove fixed limit on size of class_decl array.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9341 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-23 23:28:12 +00:00
Olly Betts
bfc8c664fa Remove unused variable
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9340 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-23 23:12:15 +00:00
Olly Betts
c9cfd2f800 Add an explicit "%prec QUESTIONMARK" for the ternary conditional operator
to fix all the shift/reduce conflicts which adding it created.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9338 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-23 23:08:22 +00:00
Olly Betts
1e19f11fdc Use Strchr/strchr instead of Strstr/strstr when searching for a single
character.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9334 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-23 22:36:23 +00:00
Olly Betts
25ed8b2e50 Be careful to only pass unsigned char values to isalpha(), etc in the hope
this is the cause of bug #1518219 (I can't reproduce it on Linux, but glibc
implements a safety net by making isalpha() etc work on signed char values
too...)


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9331 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-23 10:43:29 +00:00
Olly Betts
4f803bf0c4 Support ternary conditionals (a ? b : c) in constant expressions.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9330 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-23 09:35:31 +00:00
Olly Betts
3dca18e4db Allow <, >, <=, >=, !=, ==, and % in constant expressions.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9329 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-23 08:30:46 +00:00
Olly Betts
407b791c23 Fix 3 shift/reduce conflicts
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9328 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-23 06:23:41 +00:00
Olly Betts
609baae8ba Fix typo in comment
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9318 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-22 05:07:59 +00:00
Olly Betts
916a265191 Allow templates to be instantiated using negative numbers and constant
expressions (which fixes SF bug #956282 and several others).


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9309 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-20 11:20:52 +00:00
Olly Betts
fe4a39819c Treat a nested class definition as a forward declaration rather
than ignoring it completely, so that we generate correct code for
passing opaque pointers to the nested class (fixes SF bug #909387).


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9306 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-20 08:04:24 +00:00
Olly Betts
b1c76adc32 Remove an unused temporary buffer
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9298 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-19 18:22:11 +00:00
Olly Betts
2b307133c7 Fix a few typos in comments.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9283 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-15 19:22:15 +00:00
William S Fulton
1750a7f342 default arg fixes for directors
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9273 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-13 20:47:05 +00:00
William S Fulton
3730b3ee07 more brackets in comment fixes for simple text editor bracket matching algorithms
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9233 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-08-07 21:32:18 +00:00
William S Fulton
7b62956e29 indent beautify parsing problem fix
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9232 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-08-07 21:19:17 +00:00
William S Fulton
b98f5d8d7f Fix for buffer overflow when using large %feature(docstring) reported by Joseph Winston
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9156 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-06-12 21:15:58 +00:00