Commit graph

279 commits

Author SHA1 Message Date
Joseph Wang
68710cf9d0 allow for compilation with bison 2.4 which is more restrictive about $$
symbols than 2.3


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11014 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-12-29 22:06:50 +00:00
William S Fulton
4b79eb9219 Apply patch from Kalyanov Dmitry which fixes parsing of nested structs containing comments
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10981 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-12-12 21:31:21 +00:00
William S Fulton
cf527173cd fix display of garbage where it should display an error message in error situations of unterminated string, comment etc within %inline, nested struct etc
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10980 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-12-12 21:10:48 +00:00
William S Fulton
533ccb5097 deprecate use of include path to find the input file for behaviour that is compatible with other compilers and interopability for ccache
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10936 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-11-22 12:29:41 +00:00
William S Fulton
8ac9453f62 Fix -nopreprocess option to correctly generate output filenames and display filenames in warnings and errors
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10930 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-11-16 21:40:28 +00:00
William S Fulton
1fe9876d47 fix Swig_search_path declaration
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10927 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-11-11 22:28:18 +00:00
William S Fulton
61001d958f add parameter list (or void) to all C functions
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10926 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-11-11 22:17:40 +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
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