Commit graph

483 commits

Author SHA1 Message Date
William S Fulton
7339de974d Fix static const char member variables wrappers with %javaconst(1).
This fixes the case when an integer is used as the initializer, such as:

  struct W { static const char w = 100; };

The "valuetype" attribute has been added to the "cdecl" Node which enables
us to distinguish the declared type from the type of the initializer.
2016-01-27 09:01:00 +00:00
William S Fulton
593c452c37 Fix overloaded templates and default arguments
The defaultargs attribute was not being correctly set for functions with
default arguments when instantiated with %template.

Closes #529
2015-10-11 17:30:34 +01:00
Vladimir Kalinin
ec93b01a09 Issue #508: Classprefix is not restored after nested structures processing. Also, Classprefix is incorrectly checked in some places. 2015-10-01 15:06:42 +03:00
William S Fulton
faeaacf112 smartptr feature support - factor out common code 2015-09-25 22:57:59 +01:00
William S Fulton
01d4bc391c OS X bison warning suppression 2015-08-31 14:05:04 +01:00
Vladimir Kalinin
366e8a9f06 Restored broken ignoring of operators etc. Added more comments.
Added check for explicit $ignore, to allow correct using protected symbols

This is a single commit for patch #476
2015-07-30 08:40:52 +01:00
Vladimir Kalinin
c7e4c2d418 refactoring: 2 ways of ignoring symbol in add_symbols() merged for clarity 2015-07-22 15:40:13 +03:00
Vladimir Kalinin
6915061b7d explicitly %ignore'd symbol does not get feature:ignore if it is only added to C symbol table 2015-07-21 19:30:44 +03:00
William S Fulton
8ccf639f42 String / char * usage in parser fixes 2015-07-17 18:14:25 +01:00
William S Fulton
2e03845be8 const char * fixes in the parser 2015-07-17 17:50:11 +01:00
William S Fulton
edcdaaec16 Warning fixes for 64bit visual c++ on Windows 2015-07-03 20:59:24 +01:00
William S Fulton
05397cf6a2 Fix syntax error when the template keyword is used in types
For example:
  std::template vector<int> v;
2015-07-02 19:23:37 +01:00
William S Fulton
0b436c65ca Cosmetic parser change
Rename typemap_parameter_declarator as it is no longer just used for typemaps
2015-06-22 07:04:34 +01:00
William S Fulton
6890dfa881 Fix parse errors for C++11 type aliasing
Recently introduced by the fix for C++11 type aliasing seg fault - 117f6d00
2015-06-22 07:04:34 +01:00
William S Fulton
117f6d0026 Fix C++11 type aliasing seg fault.
Closes #424
2015-06-09 07:59:22 +01:00
William S Fulton
54e2317b24 Fix shared_ptr of classes with private constructors and destructors.
Usually these use a custom deleter passed to the shared_ptr.
This also fixes the "unref" feature when used on classes with private destructors.
2015-05-14 19:03:06 +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
William S Fulton
463b2a324c Cosmetic rename COPERATOR to CONVERSIONOPERATOR
Was never very obvious what C in COPERATOR was.
2015-05-01 19:26:09 +01:00
William S Fulton
cf29b90a2b Fix comments and newlines within operator definitions
Fix handling of conversion operators where the operator is split over multiple lines or
has comments within the operator type.

Also fix similar problem with normal operators which gave a syntax error if split over
multiple lines or had a comment within the operator declaration.

Closes #401
2015-05-01 19:22:38 +01:00
William S Fulton
fa4223e496 Fix parsing of extern "C" and typedef for example:
extern "C" typedef void (*Hook2_t)(int, const char *);
extern "C" typedef int Integer;

Closes #375
2015-04-07 21:34:23 +01:00
Olly Betts
6b6b360093 Fix segfault in handling unknown directives 2015-03-27 18:14:03 +13:00
William S Fulton
af43f90484 Wording change for missing semicolon error 2015-01-08 23:37:52 +00:00
Olly Betts
bfa570e404 Handle "constexpr explicit" and "constexpr static" 2015-01-09 11:47:40 +13:00
Olly Betts
87bdaa3910 Allow C++11 "explicit constexpr" 2015-01-08 15:56:50 +13:00
Olly Betts
62670e756e Improve errors for missing ; and unexpected ) 2015-01-08 15:27:57 +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
Vladimir Kalinin
274977154f fix for nested template defined out of class (issue #265) 2014-11-25 19:38:37 +03:00
Olly Betts
e047d2e2bd Remove bogus ; after } in documentation 2014-11-07 15:34:43 +13:00
Vladimir Kalinin
8bc38dc007 fixes "flatnested" feature for out-of-scope defined nested classes 2014-11-04 19:30:53 +03:00
William S Fulton
bfde148887 The kwargs feature no longer turns on compactdefaultargs for languages that don't support kwargs.
Affects all languages except Python and Ruby.

Closes #242
2014-10-21 07:34:51 +01:00
Johan Hake
de4f30bd3c Small fixes to the relative import fix.
-- Now the tests actually runs
  -- Corrected the syntax for the fix in the yacc file
2014-09-29 17:37:41 +02:00
Johan Hake
30e5a79ecb Fix bug 206 where package information for relative in single file import is not propagated correctly. 2014-08-25 10:09:12 +02:00
William S Fulton
71e72c45ed Create separate extetnd.c file for handling extensions / %extend
This is just a simple code refactor, moving and function renaming to
remove the %extend code out of the parser into its own file now
 that it isn't just used in the parser.
2014-05-21 19:16:15 +01:00
Vladimir Kalinin
2aa540b9c0 %extend for nested unnamed C structs 2014-05-14 00:51:36 +04:00
Vladimir Kalinin
55bda53145 C nested classes symbol table should be in global space 2014-05-10 22:16:26 +04:00
Olly Betts
36be36d618 Eliminate needless casting away const from string constants 2014-04-30 12:00:23 +12:00
William S Fulton
e186dc13b7 C++11 constexpr variables support added 2014-03-14 01:57:14 +00:00
Olly Betts
2f3bf144c6 Fix assorted comment and documentation typos 2014-02-23 17:15:22 +13:00
William S Fulton
d55692c31e Fix warning suppression using %warnfilter for PHP reserved class names.
The features need to be merged in before issuing a warning as
%warnfilter is a %feature.
2014-02-21 08:29:20 +00:00
William S Fulton
c5911cc08d Add %$isextendmember for %rename of members added via %extend 2014-02-18 23:21:46 +00:00
William S Fulton
9cbd742b66 Fix %$ismember %rename predicate for members added via %extend
Bug reported was incorrect renaming of PHP built-in functions, such as
next. See PHPFN in phpkw.swg.

Add some tests for the %rename predicates.
2014-02-18 07:30:55 +00:00
William S Fulton
3518cbfd33 Typo in comment fix 2014-02-08 09:00:52 +00:00
Vladimir Kalinin
e9ecac9298 warnings suppressed for deeply nested classes 2014-02-07 07:39:07 +04:00
Vladimir Kalinin
56cea1821d warning filter fixed 2014-02-06 23:47:01 +04:00
Vladimir Kalinin
bda9c90e2b warnfilter fixed
scoping for "anonymous forward declaration" fixed
2014-02-03 02:21:44 +04:00
Vladimir Kalinin
4744ea8903 added forward declaration instead of ignored nested class (resurrected old code) 2014-02-03 01:03:37 +04:00
Vladimir Kalinin
2f3d93e93a Nested classes support is diversified, depending on the language capability. If the language cannot support nested classes, they will be unconditionally moved to the global namespace. If language module does not override Language::nestedClassesSupport() function, nested classes will be ignored, unless "feature:flatnested" is used. 2014-02-02 22:38:13 +04:00
William S Fulton
d7e614f716 Remove debug output on 'Empty character constant' error 2014-01-19 00:23:42 +00:00
William S Fulton
6a72e16b37 Add C++11 virtual specifier sequences (final and/or override on methods)
Parsing support added. The final and override information is not used or
added to the parse tree atm.
2014-01-03 20:17:48 +00:00