Commit graph

67 commits

Author SHA1 Message Date
William S Fulton
ca64b06229 Consistent quoting in Makefile 2015-08-21 22:48:34 +01:00
William S Fulton
e00a8026a6 More remove SWIG_LIB variable 2015-08-21 22:48:34 +01:00
William S Fulton
c6f8aadc64 Cosmetic corrections - Mac OS X 2015-08-02 20:14:20 +01:00
William S Fulton
e69cc0c0f5 Improve python code indentation warning / error messages 2015-07-30 08:26:17 +01:00
Olly Betts
822b2355c0 Improve handling of whitespace in %pythoncode
Previously SWIG looked at the indentation of the first line and removed
that many characters from each subsequent line, regardless of what those
characters were.  This was made worse because SWIG's preprocessor removes
any whitespace before a '#'.  Fixes github issue #379, reported by Joe
Orton.
2015-06-29 22:12:38 +12:00
William S Fulton
efa84dab7c Fix warning display of types associated with 'using' and templates. 2015-06-09 07:59:49 +01:00
Olly Betts
b19d506db7 Suppress warning 325 "Nested class not currently supported (Foo
ignored)" when Foo has already been explicitly ignored with
"%ignore".
2015-05-05 18:07:49 +12:00
William S Fulton
428b6176df Add support for friend templates, including operator overloading.
Closes #196.
2015-05-05 06:48:25 +01:00
Olly Betts
50ba1ea6fa Adjust testcase for unknown directive error
Fixes testcase failure caused by fix for issue #394.
2015-04-30 15:27:12 +12:00
Olly Betts
dba8d4a7ea Add regression test for 6b6b360
Reported in issue#368 by clintonstimpson.
2015-03-28 11:26:13 +13:00
Olly Betts
be4065531e Add suggestion to check block delimiter
The fix for #217 means that blocks of target code delimited by { } with
'#' comments in now give errors (previously these lines were quietly
discarded).

The fix is generally to use %{ %} delimiters instead, so suggest this
might be the issue in the error message to help users hitting this issue
with wrappers which were apparently working before.
2015-01-14 16:08:08 +13:00
Olly Betts
a2f803bb5a Add explanatory comment to pp_unknowndirective2.i 2015-01-14 16:00:40 +13:00
Olly Betts
02b10195fc Add regression test for #217 2015-01-12 22:33:15 +13:00
William S Fulton
af43f90484 Wording change for missing semicolon error 2015-01-08 23:37:52 +00:00
Olly Betts
62670e756e Improve errors for missing ; and unexpected ) 2015-01-08 15:27:57 +13:00
Olly Betts
8fbdd75a0b Add test coverage for unterminated %{ ... %} block 2015-01-08 13:26:39 +13:00
Olly Betts
ce90ff6a77 When reporting an error for a construct which hasn't been terminated
when the end of the file is reached, report it at the start line rather
than "EOF" as then tools like editors and IDEs will take you to a
generally more useful place for fixing the problem.
2015-01-08 13:19:17 +13:00
Olly Betts
51487c1acc Improve error message for extraneous '%}'. 2015-01-08 12:47:12 +13:00
Olly Betts
19961d7135 Add .gitignore for Examples/test-suite/errors/ 2015-01-08 12:25:47 +13:00
Olly Betts
809ebef1f8 Fix testcase name in expected output 2015-01-08 12:21:23 +13:00
Olly Betts
04715f74e2 Improve error message when an unknown SWIG directive is used
This previously gave the cryptic "Error: Syntax error in input(1).", but
now gives "Error: Unknown directive '%foo'."
2015-01-08 12:07:54 +13:00
Olly Betts
6eaec9ce7c Update expected output for pp_constant error test 2014-09-04 09:29:20 -03:00
Olly Betts
b9fe7b5f00 Disable case in pp_constant.i which never actually worked 2014-09-03 17:18:11 -03:00
William S Fulton
b71eb53bae Fix errors test-suite on windows 2014-05-29 11:47:38 +01:00
Karl Wette
3fe1eb7056 Set SRCDIR when calling test-suite clean targets, in case it's needed 2014-05-29 02:29:27 +02:00
William S Fulton
8ece62b945 Neaten up test-suite Makefile regeneration 2014-05-15 23:11:08 +01:00
William S Fulton
2b5499a262 Slight simplification of test-suite build for new out-of-source changes
Provide default SRCDIR and SCRIPTDIR variables in common.mk and override
only where needed.
2014-05-15 23:11:07 +01:00
Karl Wette
f574a34155 Allow examples and test-suite to be built out of source tree
- Examples/Makefile.in rules use SRCDIR as the relative source directory

- ./config.status replicates Examples/ source directory tree in build
  directory, and copies each Makefile to build directory, prefixed with
  a header which sets SRCDIR to source directory

- Examples/test-suite/.../Makefile.in set SRCDIR from Autoconf-set srcdir

- Examples/test-suite/errors/Makefile.in needs to filter out source
  directory from SWIG error messages

- Lua: embedded interpreters are passed location of run-time test

- Python: copy run-time scripts to build directory because of 2to3
  conversion; import_packages example copies __init__.py from source
  directory; test-suite sets SCRIPTDIR to location of run-time tests

- Javascript: binding.gyp renamed to binding.gyp.in so that $srcdir
  can be substituted with SRCDIR; removed './' from require() statements
  so that NODE_PATH can be used to point Node.js to build directory
2014-05-11 23:21:10 +02:00
Karl Wette
96153c7c0a Regenerate configured Makefile if Makefile.in or config.status have changed 2014-05-11 21:31:32 +02:00
Karl Wette
d5b765d388 Whitespace cleanup of all Makefiles*
- some of the %.clean rules in the test-suite Makefiles were using a single tab
  as an empty rule, dangerous! I've replaced these with the safer '@exit 0'.
2014-05-02 20:06:11 +02:00
William S Fulton
aa4b14a3d2 Fix seg fault with extra ) brackets and >> 2014-04-08 19:19:44 +01:00
William S Fulton
e442903fde Fix segfault when there are too many closing round brackets in parsed code 2014-04-05 00:18:30 +01:00
William S Fulton
f999c4864e Fix errors test-suite on Mac OSX 2014-03-16 15:20:13 +00:00
William S Fulton
13aac0dca9 Portability fixes for errors test-suite 2014-03-15 18:23:02 +00:00
William S Fulton
91f4828a4a Fix missing fragment name in warning message about missing fragment 2014-02-22 01:04:50 +00:00
William S Fulton
60501fe077 Errors tests more visibly show failures as the output of diff
diff -u would be better, but it is not posix, so diff -e is chosen as
second best choice.
2014-02-16 15:16:40 +00:00
Vladimir Kalinin
54b2346c71 error order foxed 2014-02-05 02:30:48 +04:00
Vladimir Kalinin
b7fd1eacb2 WARN_PARSE_UNNAMED_NESTED_CLASS check fixed 2014-02-03 02:50:19 +04:00
William S Fulton
3055a21505 Errors test-suite overhaul
Use makefiles instead of a make.sh script
Expected results are in individual .stderr files instead of the expected.log file
Add errors test-suite to Travis testing and 'make check'
2014-01-19 00:12:12 +00:00
William S Fulton
9d003ab362 Update errors expected results 2014-01-16 19:30:48 +00:00
William S Fulton
82990df573 Error test-suite updated for nested changes
WARN_DEPRECATED_NESTED_WORKAROUND test added
WARN_PARSE_NAMED_NESTED_CLASS test removed
2013-12-19 18:23:28 +00:00
William S Fulton
d1b40b468b Fix C code where a typedef name was used for constructor and destructor names in %extend. Deprecate use of typedef names for constructor and destructor names going forwards. 2013-02-18 22:40:42 +00:00
William S Fulton
b80f4dc5e2 Restrict the name used in %extend to be just the struct/class name and not a typedef to a class/struct. Typedefs were only partially working anyway. Anonymous struct typedefs excluded. Deprecate with a warning for now. 2013-02-18 19:53:37 +00: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
bc43673a86 Add new warning if an empty template declaration is used on a base class, minor docs improvement for empty template declarations.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13840 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-09-14 22:25:35 +00:00
William S Fulton
55bda8f9f2 Fix seg fault attempting to warn about illegal destructors - introduced in rev 13111
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13128 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-05-28 06:20:45 +00:00
William S Fulton
bb3528c480 Expand special variables in typemap warnings - rework implementation
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12833 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-11-03 20:31:35 +00:00
William S Fulton
3c1ca906ac Expand special variables in typemap warnings
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12832 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-11-03 19:41:09 +00:00
William S Fulton
4c6f66577a Add warnings for badly named destructors. Fix %extend and destructors for templates - they weren't always being wrapped. Fix destructor "name" attribute.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12804 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-09-13 06:15:29 +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