Commit graph

57 commits

Author SHA1 Message Date
Olly Betts
f9566ad2df Fix assorted typos.
From https://sourceforge.net/p/swig/patches/332/ and some others too.
2013-01-08 18:47:40 +13:00
William S Fulton
093dc60d2d Fix garbage line number and empty file name reporting for some '}' or ')' error messages
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13976 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-12-16 13:56:50 +00:00
William S Fulton
425b460a09 Fix %include inside %define macros - patch from Karl Wette
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12924 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-03-15 20:32:14 +00:00
William S Fulton
31af118c41 Move Swig_locator from scanner.c to cscanner.c. Fix file and line error/warning reporting fixes where SWIG macros are used within {} braces (where the preprocessor expands macros), for example macros within %inline {...} and %fragment(...) {...} and nested structs. Basically anything that results ina call to skip_balanced() in the parser/preprocessor.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12227 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-24 22:13:13 +00:00
William S Fulton
b01277a19b Various inherited class warning/error line number fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12223 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-18 01:14:21 +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
a541f7c203 Change -debug-template to use Swig_diagnostic for file/line display
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11812 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-01-09 19:26:34 +00:00
William S Fulton
7c6aca2ebc true and false supported in constant expressions (C++ only). && || == != < > <= >= operators now return type bool (C++ only) and type int for C as per C/C++ standards.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11677 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-09-02 22:33:04 +00:00
William S Fulton
30d73c82cd Fix %feature not working for conversion operators
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11123 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-02-08 22:30:10 +00:00
Haoyu Bai
47b4825168 Merged revisions 11085-11086,11088-11089 via svnmerge from
https://swig.svn.sourceforge.net/svnroot/swig/branches/swig-2.0

........
  r11085 | bhy | 2009-01-25 00:21:55 +0800 (Sun, 25 Jan 2009) | 2 lines
  
  Fix const-correctness.
........
  r11086 | bhy | 2009-01-25 02:08:50 +0800 (Sun, 25 Jan 2009) | 2 lines
  
  Correct some function definition in header files, which implementation changed in previous commit caused mismatch.
........
  r11088 | bhy | 2009-01-25 02:38:32 +0800 (Sun, 25 Jan 2009) | 1 line
  
  minor fix and now SWIG is alive again
........
  r11089 | bhy | 2009-01-25 06:07:07 +0800 (Sun, 25 Jan 2009) | 1 line
  
  Correct some bug introduced in previous commits. Now SWIG is pretty good with C++ compiler.
........


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11097 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-01-30 10:27:37 +00:00
Haoyu Bai
6d2aef67d9 Replaced all [const] String_or_char * to const_String_or_char_ptr, by the following command:
sed -i "s/\(const \)\?String_or_char \*/const_String_or_char_ptr /g" CParse/* Include/* Modules/* Preprocessor/* Swig/*

This is a preparation for moving to new DOH, since for strong typed objects we need the const_String_or_char_ptr class to implicit convert to and from String * or const char *.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11080 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-01-24 13:15:51 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
William S Fulton
beb007b72c Fix seg fault when parsing:
%inline {
and no closing brace


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9123 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-05-17 20:16:21 +00:00
Marcelo Matus
6b1607a19a fig bug #1477756, inline and restrict keywords in C99
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9087 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-05-04 06:49:52 +00:00
William S Fulton
797317163a cosmetics
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8988 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-03-07 22:02:54 +00:00
William S Fulton
7f74b8e7a3 Common template for head of each file detailing licence, distribution and authors information
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8972 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-03-06 22:51:01 +00:00
Marcelo Matus
b748e6044a fix macro expansion issue reported by Andreas Held
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8811 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-02-13 08:55:06 +00:00
Marcelo Matus
9d4d860af6 fix line counting for inner macro expansions (one macro inside another one)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8807 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-02-12 19:48:32 +00:00
Marcelo Matus
961d9a4e08 more line counting fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8763 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-02-09 20:50:00 +00:00
Marcelo Matus
6e57a9dea4 fix line issues reported by Olly
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8743 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-02-08 01:38:58 +00:00
William S Fulton
397fe99cf9 remove old email address
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8738 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-02-07 18:23:29 +00:00
William S Fulton
72f6688a6b gcc-2.96 warning fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8696 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-02-03 22:13:07 +00:00
Marcelo Matus
f659f0c088 disable looking for locators that now are not generated
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8473 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-17 01:07:28 +00:00
Marcelo Matus
c694a41954 fix line number problem with %inline{} and recognize the 'explicit' directive in constructors
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8084 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-27 21:26:10 +00:00
Marcelo Matus
f787718a53 remove extra breaks as in #1381950
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8020 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-21 02:08:23 +00:00
Marcelo Matus
50ae3fe87e add C++ operator aliases
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7924 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-04 05:08:50 +00:00
Marcelo Matus
628dc6b32b add NewStringEmpty, use more StringEuqual and less Strcmp
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7897 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-11-28 17:32:56 +00:00
William S Fulton
fb94cfadc1 Add in support for non standard integral types used on Windows - Bug #872013
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7839 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-11-10 21:21:04 +00:00
Marcelo Matus
e1534a90e0 add more support for operators + templates
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7807 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-11-05 10:26:37 +00:00
Marcelo Matus
bf2dac0672 fix bug #1347853 and better and/or/not operator management
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7799 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-11-04 16:47:07 +00:00
Marcelo Matus
dbc13bb676 recognize the and/not/or keywords and operator names
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7745 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-27 14:44:27 +00:00
Marcelo Matus
c1e79cd94d add more support for wchar
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7647 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-13 09:23:20 +00:00
Marcelo Matus
e623572061 add support for 'register'
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6727 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-15 20:51:48 +00:00
William S Fulton
74f9ab820b compact default arguments feature (original default argument wrapping mode)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6449 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-20 20:59:33 +00:00