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
45601f24b4
Fix line numbers in error and warning messages for preprocessor messages within %inline. Also fixes __LINE__ within %inline
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12200 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-03 17:47:12 +00:00
William S Fulton
a44f83cf05
Fix line numbers in error and warning messages which were accumulately one less than they should have been after parsing each %include/%import - bug introduced in swig-1.3.32. Also fix line numbers in error and warning messages when new line characters appear between the %include / %import statement and the filename.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12199 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-03 06:03:48 +00:00
William S Fulton
8a169eb0cb
Fix wrapping of C++ enum boolean values
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12028 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-14 18:46:20 +00:00
William S Fulton
01c4ab6baf
Fix some terminology used in C++ template partial specialization and new typemap matching rules
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11982 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-04-09 21:40:23 +00:00
William S Fulton
2442211292
unnecessary cast removed
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11895 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-03-04 18:28:23 +00:00
William S Fulton
931628f8b2
Remove the svn/cvs Id string in the headers
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11877 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-02-28 00:09:20 +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
b40a8e38ab
Correct syntax of %includefile and %importfile in comment
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11846 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-02-08 23:09:22 +00:00
William S Fulton
160ce6d4a8
Slight performance tweak for templates
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11834 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-01-29 18:49:16 +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
83bd820285
Add typemaps used debugging option (-debug-tmused). Fix missing file/line numbers for typemap warnings and in the output from the -debug-tmsearch/-debug-tmused options
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11802 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-01-04 19:33:52 +00:00
William S Fulton
2e9624af94
Minor correction in a comment
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11789 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-12-19 11:47:05 +00:00
William S Fulton
b86939aae5
Remove redundant code which is no longer being used since the template specialization improvements were added
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11784 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-12-15 07:08:53 +00:00
William S Fulton
7bcc069982
Suppress incorrect 'unused value' bison warning
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11778 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-12-10 22:34:02 +00:00
Olly Betts
02eb6a81d1
Fix handling of modulo operator (%) in constant expressions (SF#2818562).
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11774 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-12-04 05:46:31 +00:00
William S Fulton
2a59a2e6a9
Improved C++ nested class support - nested typedef'd classes now parsed and treated as forward class declaration
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11756 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-11-23 23:02:01 +00:00
William S Fulton
43b6292681
Nested struct pretty print rewrite and fix. The wrappers for C nested structs are now generated in the same order as declared in the parsed code.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11755 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-11-18 23:59:10 +00:00
William S Fulton
aa6712e3f2
pretty print the nested structs generated as global structs
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11754 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-11-18 20:37:23 +00:00
William S Fulton
a9ccc5a866
Fix multiple declarations of nested structs (C code)
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11753 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-11-18 20:24:06 +00:00
William S Fulton
7cb4e902d5
Fix parsing of enum declaration and initialization
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11752 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-11-17 19:31:13 +00:00
William S Fulton
7fd36f5bd6
Fix parsing of struct declaration and initialization
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11750 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-11-17 18:45:53 +00:00
William S Fulton
0286f6d43e
Fix #1960977 - Syntax error parsing derived nested class declaration and member variable instance
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11748 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-11-15 00:36:22 +00:00
William S Fulton
7ae45bc020
Fix #2310483 - function pointer typedef within extern C block.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11742 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-11-14 15:55:23 +00:00
William S Fulton
0509dbb951
some parser code comments added
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11741 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-11-13 19:21:33 +00:00
William S Fulton
1b951d68f4
nested classes code refactor
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11738 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-11-13 18:27:41 +00:00
William S Fulton
aa61c716a8
Stop generating uncompileable code when using nested template classes in functions. Replace SWIGWARN_PARSE_NESTED_CLASS with SWIGWARN_PARSE_NAMED_NESTED_CLASS and SWIGWARN_PARSE_UNNAMED_NESTED_CLASS for named and unnamed nested classes respectively. Named nested class ignored warnings can now be suppressed by name using %warnfilter
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11735 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-11-12 19:47:04 +00:00
William S Fulton
ebed6508e4
Nested class improvements - Fixed inconsistency in handling C++ nested classes - sometimes they were treated as forward declarations, other times as if C nested struct was parsed. Added the nestedworkaround feature for C++ nested class handling. Document improved nested class handling. Numerous C and C++ nested struct/class/union test cases added.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11734 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-11-11 00:30:34 +00:00
William S Fulton
9b318c45bc
inner declared types are treated as forward declarations - consistency now between innner/nested unions/structs and classes - only relevant to C++
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11730 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-11-08 20:45:48 +00:00
William S Fulton
9d65c100b9
Ignored nested class/struct warnings now display the name of the ignored class/struct.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11728 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-11-08 01:18:45 +00:00
William S Fulton
ec6bf1ec96
Fix nested template classes within a namespace generating uncompileable code by incorrectly adding in symbols into the symbol tables and not setting the scope correctly after the nested template was parsed
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11727 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-11-08 00:14:47 +00:00
William S Fulton
64d1b6f0c6
Add -debug-symtabs and -debug-qsymtabs options for debugging symbol tables
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11724 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-11-04 22:49:39 +00:00
William S Fulton
dbe46033ee
remove debug in last commit
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11721 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-11-03 19:57:35 +00:00
William S Fulton
57fff12d5f
Fix seg fault for some template parameters which have no type, just a default value
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11720 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-11-03 19:52:12 +00:00
William S Fulton
16b8caa3de
Fix seg fault when two or more %template() declarations were made within a class
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11712 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-10-23 05:59:13 +00:00
William S Fulton
f825fba4f7
fix partial specialization with many parameters
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11709 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-10-20 23:21:28 +00:00
William S Fulton
4b2ced5095
Fix partial specialization and explicit specialization lookup
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11703 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-10-20 17:50:36 +00:00
William S Fulton
4ebb9b0db2
minor rewrite of enum value handling
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11690 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-09-13 20:20:11 +00:00
Olly Betts
7df94f65e5
Clean-up remnants of SWIG_GE, etc workaround which is no longer used.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11689 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-09-12 08:23:55 +00:00
William S Fulton
2726424a7f
Fix constant expressions containing <= or >=
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11687 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-09-11 18:47:05 +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
d74b680a79
Fix %template seg fault on some cases of overloading the templated method.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11582 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-15 10:40:19 +00:00
William S Fulton
7f0e632ddd
typemap method name: use consistent terminology in code
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11473 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-30 06:06:49 +00:00
William S Fulton
3dbca3bd05
Fix syntax error when a nested struct contains a comment containing a * followed eventually by a /
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11344 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-02 18:25:04 +00:00
William S Fulton
bd46f03b6f
Fix #2746858 - C macro expression using floating point numbers
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11185 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-04-09 17:51:59 +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
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