Commit Graph

1049 Commits

Author SHA1 Message Date
William S Fulton a4e48b18e5 Merge branch 'baldurk-raw-strings-issue-948'
* baldurk-raw-strings-issue-948:
  Experimental fix for delimiter leakage in raw strings.
2019-01-04 19:32:45 +00:00
William S Fulton 33921666a1 Merge branch 'vadz-doxygen'
This is the Doxygen work begun in Google Summer of Code projects 2008
and 2012 and subsequently improved by numerous contributors.

* vadz-doxygen: (314 commits)
  Add changes entry for Doxygen support
  Add some missing doctype tyemaps
  Doxygen warnings cleanup
  Move doxygen warning numbers
  Add Python doxygen example
  Doxygen example
  Add Doxygen to include paths
  Doxygen source rename
  More merge fixes from doxygen branches
  Correct python example headers
  Correct source code headers
  Another merge fix from doxygen branches
  Java enums output format fixes
  Add omitted doxygen_parsing_enums testcase
  PEP8 conformance for comment verifier module
  Clean up merge problem
  Doxygen html tweaks
  Update html chapter numbering for added Doxygen chapter
  Fixes to makechap.py to detect ill-formed headers
  html fixes for Doxygen
  Add missing CPlusPlus17.html file
  Format files to unix format
  Doxygen testcase tweak to match that in the html docs
  Doxygen html documentation updates and corrections
  Remove doxygen Examples subdirectory
  Beautify doxygen source code
  Code formatting fixes in doxygen code
  Remove unused doxygen code
  new_node refactor
  Various merge fixes in doxygen branches
  Unused variable warning fix
  Fix wrongly resetting indent after formulae in Doxygen comments
  Add support for doxygen:alias feature
  Get rid of meaningless return type of DoxygenParser methods
  Return enum, not untyped int, when classifying Doxygen commands
  Get rid of unnecessary "typedef enum" in C++ code
  Use slash, not backslash, in "C/C++" in the documentation
  Replace literal "<" with "&lt;" in HTML documentation
  Fix broken link to java.sun.com in Doxygen documentation
  Fix using com.sun.tools.javadoc package under macOS
  Fix error reporting for special characters in Doxygen parsing code
  Switch Python Doxygen unit tests to use inspect.getdoc()
  Use correct separator in Java class path under Windows.
  Remove executable permission from appveyor.yml.
  Use JAVA_HOME value in configure to detect Java.
  Display JAVA_HOME value in "make java_version".
  Fix harmless MSVC warning in DoxygenTranslator code.
  Reset "_last" for all but first enum elements.
  Don't duplicate Javadoc from global enum Doxygen comments twice.
  Move Doxygen comments concatenation from the parser to the lexer.
  Fix shift/reduce conflicts in Doxygen pre/post comment parsing.
  Rewrote part of the grammar dealing with Doxygen comments for enums.
  No changes, just remove spurious white space only differences.
  Move Doxygen comment mangling from the parser to the lexer.
  Merge "-builtin" autodoc bugs workarounds from master into test.
  Quote JAVA_HOME variable value in Java test suite makefile.
  Remove unused C_COMMENT_STRING terminal from the grammar.
  Fix missing returns in the Doxygen test suite code.
  Fix trimming whitespace from Doxygen comments.
  Remove code not doing anything from PyDocConverter.
  Remove unused <sstream> header.
  Remove unreferenced struct declaration.
  Remove unused Swig_warn() function.
  Remove any whitespace before ignored Doxygen commands.
  Remove trailing space from one of Doxygen tests.
  Fix autodoc strings generated in Python builtin case and the test.
  Fix Doxygen unit test in Python "-builtin" case.
  Use class docstrings in "-builtin" Python case.
  Don't indent Doxygen doc strings in generated Python code.
  Add a possibility to flexibly ignore custom Doxygen tags.
  Stop completely ignoring many Doxygen comments.
  Fix structural Doxygen comment recognition in the parser.
  No changes, just make checking for Doxygen structural tags more sane.
  Use "//", not "#", for comments in SWIG input.
  Allow upper case letters and digits in Doxygen words.
  Pass the node the Doxygen comment is attached to to DoxygenParser.
  Get rid of findCommand() which duplicaed commandBelongs().
  Recognize unknown Doxygen tags correctly.
  No real changes, just pass original command to commandBelongs().
  Describe Doxygen-specific %features in a single place.
  Give warnings for unknown Doxygen commands in Doxygen parser.
  Document the return type when translating Doxygen @return to Python.
  Fix translated Doxygen comments for overloaded functions in Python.
  Also merge Doxygen comments for overloaded constructors in Python.
  Allow using enum elements as default values for Python functions.
  Don't always use "*args" for all Python wrapper functions.
  No real changes, just make PYTHON::check_kwargs() const.
  Refactor: move makeParameterName() to common Language base class.
  Remove long line wrapping from Python parameter list generation code.
  Simplify and make more efficient building Python docstrings.
  Translate Doxygen code blocks to Sphinx code blocks.
  Add a simple test of multiple parameters to Doxygen test suite.
  Make Python parameters types hyperlinks in the doc strings.
  Make Language::classLookup() and enumLookup() static.
  Fix arguments of @param, @return etc translations to Python.
  Remove unused method from PyDocConverter.
  No real changes, just remove an unnecessary variable.
  Preserve relative indentation when parsing Doxygen comments.
  Use Sphinx-friendly formatting for overloaded functions documentation.
  Add poor man trailing white space detection to Doxygen Python tests.
  ...
2018-06-07 08:13:10 +01:00
William S Fulton 9deaa6ff24 new_node refactor
Reduce code duplication for doxygen to match code in master prior to
merge to master
2018-05-19 09:00:06 +01:00
luz.paz 60dfa31a67 Misc. typos
found via `codespell` and `grep`
2018-05-17 10:04:23 -04:00
Vadim Zeitlin b7f78dd5a7 Merge branch 'master' into doxygen 2018-03-19 21:54:46 +01:00
William S Fulton 07a30249f4 Fix seg fault parsing invalid exponents
Add error message when exponents are incomplete,
for example 5e and 5.e
2018-01-14 19:36:09 +00:00
William S Fulton 7d6808daab Small code simplification using SwigValueWrapper
Closes #1139
2017-11-03 07:11:12 +00:00
William S Fulton 8834047dcd Enhance -debug-csymbols and -debug-symbols to show siblings 2017-10-02 19:07:24 +01:00
William S Fulton e27a606335 Allow an instantiated template to have the same name as the C++ template name
For example, this is now possible:
  template<typename T> struct X { ... };
  %template(X) X<int>;
Closes #1100.
2017-09-29 23:28:04 +01:00
William S Fulton 9e79d3566b Workaround spurious gcc warning [-Woverlength]
warning: string length ‘2241’ is greater than the length ‘509’ ISO C90 compilers are required to support [-Woverlength-strings]
2017-09-20 14:04:16 +01:00
Vadim Zeitlin db65ae5aea Merge branch 'master' into doxygen
Fix the usual conflicts in autodoc unit test due to fixing the
divergences in autodoc generation between builtin and default cases in
this branch.
2017-09-19 14:02:53 +02:00
William S Fulton 45c161dfce Fix wrapping of some member function pointer parameters
Generated code did not compile if both cv-qualifiers and rvalue
ref-qualifiers were present in the member function pointer.
2017-09-07 06:58:01 +01:00
William S Fulton eb68e4375d Add support for member function pointers with ref-qualifiers 2017-09-05 18:44:00 +01:00
William S Fulton 8a40327aa8 Add unignore for rvalue ref-qualifiers
Use std::move on this pointer as the default approach to supporting
rvalue ref-qualifiers if a user really wants to wrap.

std::move requires <memory> headers so add swigfragments.swg for all
languages to use common fragments. Just header file fragments for now.
2017-08-30 18:17:04 +01:00
William S Fulton 1cf599bccb Improve ref-qualifier implementation
Internally, handle function ref-qualifiers in the function decl type string.
Needed for a whole host of things to work like %feature and %rename.
Add %feature %rename and %ignore testing for ref-qualifiers.
2017-08-30 18:17:04 +01:00
William S Fulton eeab152901 Fix support for member const function pointer variables
Was not generating code that compiled when the variable was not
a simple member pointer, for example,
a const reference member pointer:
  short (Funcs::* const& cc7)(bool) const = cc1;
2017-08-30 18:16:59 +01:00
William S Fulton 685ee6cdc4 Use normal SWIG encodings for ref-qualifiers 2017-08-19 09:38:19 +01:00
William S Fulton 9e19fe7868 C++11 ref-qualifier support added
Fixes #1059

Methods with rvalue ref-qualifiers are ignored by default as it is not
possible to have an rvalue temporary from the target language (which is
needed to call the rvalue ref-qualified method).
A warning 405 is shown mentioning the ignored rvalue ref-qualifier method
which can be seen with the -Wextra option.

  cpp_refqualifier.i:15: Warning 405: Method with rvalue ref-qualifier ignored h() const &&.

Usually rvalue and lvalue ref-qualifier overloaded methods are written - the
lvalue method will then be wrapped.
2017-08-19 01:02:34 +01:00
William S Fulton 32a454cfef Merge branch 'templates-scope-enforcement'
* templates-scope-enforcement:
  Test a few %template errors
  Add using declarations to templates into typedef table.
  Fix type lookup in the presence of using directives and using declarations
  More docs on %template
  Testcase fix for nameclash in php
  %template scope enforcement and class definition fixes
  Template documentation tweaks
  More consistent formatting of examples in documentation
  More consistent formatting of examples in documentation
  Documentation corrections to use targetlang formatting
  More consistent formatting of examples in documentation
  More consistent formatting of examples in documentation
  More consistent formatting of examples in documentation
  Namespace documentation minor corrections
  Improve description of template_parameters_resolve
  Minor code optimisation in template_parameters_resolve
  Fix scope lookup for template parameters containing unary scope operators
  Typemap change for templates
2017-08-16 21:44:51 +01:00
William S Fulton 96e99416d7 Add using declarations to templates into typedef table.
Fixes #1051. Using declarations to templates were missing in SWIG's internal typedef tables.
This led to a few problems, such as, templates that did not instantiate and generated
C++ code that did not compile as SWIG did not know what scope the template was
in. This happened mostly when a using declaration was used on a template type in a
completely unrelated namespace.
2017-08-16 00:24:25 +01:00
William S Fulton bf98c5304f Fix type lookup in the presence of using directives and using declarations
Fix some cases of type lookup failure via a combination of both using directives and
using declarations resulting in C++ code that did not compile as the generated type was
not fully qualified for use in the global namespace. Example below:

    namespace Space5 {
      namespace SubSpace5 {
        namespace SubSubSpace5 {
          struct F {};
        }
      }
      using namespace SubSpace5;
      using SubSubSpace5::F;
      void func(SubSubSpace5::F f);
    }
2017-08-16 00:24:25 +01:00
William S Fulton 959e627208 %template scope enforcement and class definition fixes
The scoping rules around %template have been specified and enforced.
The %template directive for a class template is the equivalent to an
explicit instantiation of a C++ class template. The scope for a valid
%template instantiation is now the same as the scope required for a
valid explicit instantiation of a C++ template. A definition of the
template for the explicit instantiation must be in scope where the
instantiation is declared and must not be enclosed within a different
namespace.

For example, a few %template and explicit instantiations of std::vector
are shown below:

  // valid
  namespace std {
    %template(vin) vector<int>;
    template class vector<int>;
  }

  // valid
  using namespace std;
  %template(vin) vector<int>;
  template class vector<int>;

  // valid
  using std::vector;
  %template(vin) vector<int>;
  template class vector<int>;

  // ill-formed
  namespace unrelated {
    using std::vector;
    %template(vin) vector<int>;
    template class vector<int>;
  }

  // ill-formed
  namespace unrelated {
    using namespace std;
    %template(vin) vector<int>;
    template class vector<int>;
  }

  // ill-formed
  namespace unrelated {
    namespace std {
      %template(vin) vector<int>;
      template class vector<int>;
    }
  }

  // ill-formed
  namespace unrelated {
    %template(vin) std::vector<int>;
    template class std::vector<int>;
  }

When the scope is incorrect, an error now occurs such as:

cpp_template_scope.i:34: Error: 'vector' resolves to 'std::vector' and
was incorrectly instantiated in scope 'unrelated' instead of within scope 'std'.

Previously SWIG accepted the ill-formed examples above but this led to
numerous subtle template scope problems especially in the presence of
using declarations and using directives as well as with %feature and %typemap.

Actually, a valid instantiation is one which conforms to the C++03
standard as C++11 made a change to disallow using declarations and
using directives to find a template.

  // valid C++03, ill-formed C++11
  using std::vector;
  template class vector<int>;

Similar fixes for defining classes using forward class references have
also been put in place. For example:

namespace Space1 {
  struct A;
}
namespace Space2 {
  struct Space1::A {
    void x();
  }
}

will now error out with:

cpp_class_definition.i:5: Error: 'Space1::A' resolves to 'Space1::A' and
was incorrectly instantiated in scope 'Space2' instead of within scope 'Space1'.
2017-08-16 00:24:25 +01:00
William S Fulton 2681bbad36 Improve description of template_parameters_resolve 2017-08-16 00:24:24 +01:00
William S Fulton 8bf3a342c2 Minor code optimisation in template_parameters_resolve 2017-08-16 00:24:24 +01:00
William S Fulton 26e14c4f18 Fix scope lookup for template parameters containing unary scope operators
Fixes cases like:

namespace Alloc {
  template<typename T> struct Rebind {
    typedef int Integer;
  };
}
%template(RebindBucket) Alloc::Rebind< Bucket >;
OR
%template(RebindBucket) Alloc::Rebind< ::Bucket >;

Alloc::Rebind< Bucket >::Integer Bucket1() { return 1; }
Alloc::Rebind< ::Bucket >::Integer Bucket2() { return 2; }
Alloc::Rebind<::template TemplateBucket<double>>::Integer Bucket3() { return 3; };
2017-08-16 00:24:24 +01:00
William S Fulton aa2932f409 Typemap change for templates
For templates only, the template parameters are fully resolved when
handling typemaps. Without this, it is too hard to have decent rules
to apply typemaps when parameter types are typedef'd and template
parameters have default values.

Fixes %clear for typedefs in templates, eg:

  %typemap("in") XXX<int>::Long "..."
  template typename<T> struct XXX {
    typedef long Long;
  };
  %clear XXX<int>::Long;

as the typemap was previously incorrectly stored as a typemap for long
instead of XXX<int>::Long.
2017-08-16 00:24:06 +01:00
Olly Betts 90f9117e10 Fix various comment and documentation typos 2017-08-13 18:04:33 +12:00
baldurk 0eba02f37a Experimental fix for delimiter leakage in raw strings. 2017-07-06 17:40:44 +01:00
William S Fulton 11aa71b939 Make sure warning and error messages are not split up
They could be split up by other processes writing to stdout
at the same time.
2017-06-16 19:24:48 +01:00
William S Fulton 72ba741d1c Fix wrapping of references/pointers and qualifiers to member pointers
Also fix Go wrapping of member const function pointers.
2017-03-16 21:04:38 +00:00
William S Fulton 4f235027f4 Improved member function pointer parsing
Add support for parsing member function pointers with qualifiers,
references and pointers, eg

short (Funcs::* const parm)(bool)
2017-03-10 23:25:31 +00:00
William S Fulton 5aff26fcb5 Add support for parsing and wrapping member const function pointers 2017-03-10 23:25:31 +00:00
William S Fulton dee6b075a8 Fix seg fault parsing unterminated raw string literals 2017-02-09 22:02:20 +00:00
William S Fulton d387e749f5 Warning fix for visual c++ 2017-02-04 19:18:54 +00:00
William S Fulton 25ac8f97f6 Fix popen pclose warnings compiling under wine
Fix i686-w64-mingw32-g++ compiler on linux warning:

In file included from Swig/swig.h:21:0,
                 from Swig/misc.c:14:
Swig/misc.c:1125:14: warning: ‘_popen’ redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
 extern FILE *popen(const char *command, const char *type);
              ^
Swig/misc.c:1126:12: warning: ‘_pclose’ redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
 extern int pclose(FILE *stream);
2017-02-04 19:18:54 +00:00
Vadim Zeitlin 294ab27b90 Merge branch 'master' into doxygen
Merge 3.0.12 release changes from master.
2017-02-01 02:21:35 +01:00
William S Fulton 4c1152efcd Merge branch 'fschlimb-templ_def_cache'
* fschlimb-templ_def_cache:
  Add template_default_cache runtime tests
  Fix template_default_cache testcase
  template_default_cache is a multi-module test
  using 2-level caching as suggested by @wsfulton
  account for explicitly qualified scopes
  adding test
  restricting chaching template default types
2017-01-16 07:50:13 +00:00
William S Fulton 3d2e57b0f2 Add %proxycode directive for adding code into proxy classes for C#, D and Java 2017-01-13 20:43:50 +00:00
Frank Schlimbach be92482e27 using 2-level caching as suggested by @wsfulton 2017-01-09 09:46:33 -06:00
William S Fulton e6b270b6dc Suppress incorrect warning when a keyword is used in template classes
Closes https://github.com/swig/swig/issues/845
2016-12-20 19:44:57 +00:00
Vadim Zeitlin e668c47b70 Merge branch 'master' into doxygen
The way Python docstrings are indented has changed on master, so use the
standard inspect module in Python autodoc unit test to ignore the differences
in their indentation level between -builtin and non-builtin cases to make the
test still pass with the branch version, which avoids the use of different
(but almost identical) values in the test itself.
2016-12-12 01:24:17 +01:00
William S Fulton 7268f58c4c Fix %rename override of wildcard %rename for templates
%rename(GlobalIntOperator) *::operator bool; // wildcard %rename
%rename(XIntOperator) X::operator bool; // fix now overrides first %rename above
OR
%rename(XIntOperator) X<int>::operator bool; // fix now overrides first %rename above

template<typename T> struct X {
  operator bool();
  ...
};
%template(Xint) X<int>;
2016-11-28 22:50:52 +00:00
Frank Schlimbach 4eb7fb8123 account for explicitly qualified scopes 2016-10-11 07:05:44 -05:00
Frank Schlimbach 49cd031f12 restricting chaching template default types 2016-10-10 10:42:23 -05:00
Amarnath Valluri 030a3b08bf Fix leaked file descriptor
Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
2016-06-16 15:53:22 +03:00
Vadim Zeitlin 891565a3ca Refactor several Swig_name_xxx() functions into a single one
All Swig_name_{construct,copyconstructor,destroy,disown}() functions were
almost exactly identical, just replace them with a single make_full_name_for()
function to avoid code quadplication.
2016-04-11 16:50:41 +02:00
Vadim Zeitlin 3d7806bbe6 Refactor code accessing naming_hash
No real changes, but avoid repeating the same snippet of code, looking up
something in a hash and falling back to the default value if it's not present
there, in many places and use a simple wrapper get_naming_format_for()
function instead.

The wrapper function is also marginally more efficient than the old code as it
avoids creating the naming hash just to check if the key is in it -- we can be
pretty sure it isn't, if the hash hadn't existed before.
2016-04-11 16:39:44 +02:00
William S Fulton ac495d5c66 Merge branch 'char-escaping'
* char-escaping:
  Add missing string_constant.i testcase
  changes file update for char wrappers
  C# char wrappers fixes for enum values, static const member char values and %csconst
  D testing added for %dmanifestconst and char constants
  Fix wrapping D constants using %dmanifestconst
  Php fix for enum value of '\0'
  Fix static const char member variables wrappers with %javaconst(1).
  Expand char testing in enums and %constant
  Java char changes file update
  Java enum and static member variable escaping fix for chars
  Add tests for enum values and static const member variables chars containing escape sequences
  Minor documentation tweak

Conflicts:
	CHANGES.current
2016-03-12 23:27:51 +00:00
William S Fulton 5fb6537f69 C# char wrappers fixes for enum values, static const member char values and %csconst
Use hex escaping for char values used as C# constants
2016-03-12 18:52:49 +00:00
William S Fulton 4a3e1fd44c Add rstrip encoder for use in %rename.
This is like the strip encoder but strips the symbol's suffix instead
of the prefix.
2016-03-02 07:11:09 +00:00
William S Fulton f112a0b610 Correct regex example comment 2016-02-29 07:55:01 +00:00
William S Fulton 9f0e7885ce Properly hide unexposed naming functions in naming.c 2016-02-29 07:11:05 +00:00
William S Fulton 8173c5935e Show node pointer value when displaying a node tree
For easier debugging when using -debug-module, -debug-top etc
2015-10-10 15:19:52 +01:00
Vadim Zeitlin 99b604518d Remove unused support for typemap scopes
The functions Swig_typemap_new_scope() and Swig_typemap_pop_scope() introduced
by 503746e964 back in 2000 were never used and
ended up being commented out themselves, but support for typemap scopes still
remain in several other functions. Remove it completely to make the code
simpler without any ill effects.
2015-09-15 03:08:57 +02:00
William S Fulton 457e0bfa81 Typemap attribute fixes
Fix for breakages in previous few commits:
- Perl test-suite - the "varout" typemap "type" attribute is now
  expanded in typemap.c instead of Perl.cxx.
- The swig_typemap_warn errors testcase showed that $1 was no longer
  being expanded correctly when used in output typemaps (lname not set).
2015-07-24 00:32:46 +01:00
William S Fulton 2f00f6c8cc Support special variable expansion in special variable macros in typemap attributes.
Add test cases for special variable expansions and special variable
macros (aka embedded typemaps) expansion.
2015-07-22 22:04:35 +01:00
Lindley French 94f683868a Enable variable and typemap substitution in typemap kwargs, and a test that verifies this works for directorin:descriptor. 2015-07-22 11:31:21 -07:00
Vadim Zeitlin 302955a152 Another merge with master.
Updated Doxygen error numbers yet again, as Python errors got added in the
meanwhile, pushing the Doxygen ones further off.

And re-merged PEP8/whitespace-related conflicts in autodoc_runme.py once again
(if anybody is looking for a motivating example about why significant
whitespace is bad, here is a great use case).
2015-07-20 00:44:26 +02:00
William S Fulton 64652523d5 warning fixes 2015-07-17 18:18:44 +01:00
William S Fulton fb2b1af2e7 Warning fixes for 64bit visual c++ on Windows 2015-07-03 20:59:24 +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 efa84dab7c Fix warning display of types associated with 'using' and templates. 2015-06-09 07:59:49 +01:00
William S Fulton 428b6176df Add support for friend templates, including operator overloading.
Closes #196.
2015-05-05 06:48:25 +01:00
Vadim Zeitlin e546dfd856 Remove unused Swig_warn() function.
This was removed in master by 1e8fa8fee0 but
somehow left here.
2015-02-16 23:50:12 +01:00
Vadim Zeitlin 300ccce46c Another merge with master.
Change Doxygen error codes to start at 740 instead of at 720 as the latter was
taken by Scilab in the meanwhile.

Resolve conflicts in autodoc_runme.py once again.
2015-02-16 23:46:39 +01:00
Olly Betts 51487c1acc Improve error message for extraneous '%}'. 2015-01-08 12:47:12 +13:00
William S Fulton ee35389d22 Fix abort using template default parameters
Closes #280
2014-12-28 10:39:53 +00:00
William S Fulton 2e01533b23 Partial support for %constant and structs
Test case is slightly modified from the test case in issue #250

Use of constant objects does not seem to work in Python - the type is
SwigPyObject instead of constant_directive.Type1.
2014-12-18 07:01:08 +00:00
Vadim Zeitlin 9b857e6cf1 Merge latest master into doxygen branch. 2014-12-15 02:55:26 +01:00
Vadim Zeitlin 6cce652762 Merge latest master into doxygen branch again.
Update Doxygen-specific Python unit tests to work with the new indentation.

Update one of Doxygen-specific Java tests to still build with the new handling
of srcdir.
2014-08-13 16:11:21 +02:00
William S Fulton 83749b3937 Fix expansion of the $parentclassname special variable
It incorrectly contains brackets in the expanded name.
Fixes SF Bug 1375.
2014-07-01 20:27:48 +01: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
Vadim Zeitlin 1ebd2334b8 Merge branch 'master' into doxygen
Merge with ~3.0.1 sources from master.
2014-04-30 18:37:57 +02:00
Olly Betts 36be36d618 Eliminate needless casting away const from string constants 2014-04-30 12:00:23 +12:00
William S Fulton 7bec7c1b60 Further shift operator regression fixes 2014-04-08 19:19:44 +01:00
William S Fulton 0be33b1900 Fix use of shift operators in expressions regression since 3.0.0 2014-04-08 19:19:44 +01:00
William S Fulton aa4b14a3d2 Fix seg fault with extra ) brackets and >> 2014-04-08 19:19:44 +01:00
William S Fulton 5feaa79176 More efficient end of template bracket (>>) handling 2014-04-08 19:19:44 +01:00
William S Fulton 9959860235 beautify scanner.c 2014-04-08 19:19:43 +01:00
William S Fulton 6cbf059fb8 Tidy up scanner.c
Make local functions static and rename them accordingly
2014-04-08 19:19:43 +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 e64d388957 Refix operator<< definition giving a syntax error 2014-04-05 00:17:06 +01:00
William S Fulton 1d857beb9d Fix regression in 3.0.0 where legal code following an operator<< definition might give a syntax error.
SF Bug #1365.
2014-04-04 08:31:59 +01:00
William S Fulton dcbd6e39e3 Fix potential bugs found by Coverity analysis 2014-04-02 22:08:32 +01:00
William S Fulton eab762baa2 gcc-3.4 warning fix 2014-03-15 22:45:28 +00:00
Vladimir Kalinin e18044185e fixes for director class naming when nested classes are used 2014-03-13 18:58:29 +04:00
William S Fulton dbf44fc181 Fix std::map and smart pointers.
Fixes problem with method overloading when some methods are added by %extend
and others are real methods and using template default parameters with smart pointers.
This is noticeable as a regression since 2.0.12 when using the default smart pointer
handling for some languages when the smart pointer wraps std::map and other STL containers.

Fixes SF Bug 1363
2014-03-06 19:52:03 +00:00
Olly Betts 2f3bf144c6 Fix assorted comment and documentation typos 2014-02-23 17:15:22 +13:00
William S Fulton 91f4828a4a Fix missing fragment name in warning message about missing fragment 2014-02-22 01:04:50 +00:00
Yann Diorcet c319ad9dd6 Resolve prefix when resolving typedef 2014-01-12 00:17:16 +00:00
Vladimir Kalinin b4fef06c42 fixed %template within %extend, test added
fixed language symbol table nested classes name separator, test added
fixed %feature "flatnested" working with %extend
fixed Swig_offset_string for empty string
added simple template to save/restore values in current scope (readability reasons)
2013-12-19 02:11:22 +04:00
William S Fulton 314fae460b Merge branch 'nested' - nested structs/classes support
* nested:
  Deprecation of the 'nestedworkaround' feature
  Ensure -c++out is not used with -c++
  Add missing header to new source file
  Nested C class setters restored in c++out mode for Octave
  Classprefix fixed after private nested classes some comments and spaces added
  Fix template partial specialization detection
  Minor tweaks in Swig_feature_set
  Swig_offset_string moved to misc.c
  nested private classes are discarded while parsing nested relate functions are moved to nested.cxx and renamed accordingly
  out-of-scope template definitions fixed nested_private test disabled again
  fixed out-of-scope nested class definitions, added a test enabled nested C structs assignment (still disabled for Octave), added Java runtime test fixed nested_private test case for Java & C#
  Testcase of private nested class usage causing segfault
  C nested struct passed by value example
  Add in Travis testing for nested branch
  Add C++ nested class example
  Minor code improvements
  Cosmetics/code beautification of nested class support
  Nested classes support
2013-12-14 15:12:07 +00:00
William S Fulton 2121e1217e Ensure -c++out is not used with -c++
Error checking for this combination implemented as well as correcting
Octave

Also refactor, replacing CPlusPlusOut variable with cparse_cplusplusout
for an implementation which more closely resembles cparse_cplusplus which
is also required in both .c and .cxx files.
2013-12-12 20:52:44 +00:00
William S Fulton e95ac82651 Nested C class setters restored in c++out mode for Octave
Suitable casts are required so that assignment of instances of nested classes
work as the nested class is duplicated in the global namespace, eg:

struct Outer {
  struct Nested {
    int bar;
  } bar_instance;
};

Outer.bar_instance can now be assigned to.
2013-12-12 09:00:16 +00:00
Olly Betts c6e4dea572 Fix a few typos in comments and docs 2013-12-12 11:45:30 +13:00
William S Fulton 6d97335d94 Minor tweaks in Swig_feature_set 2013-12-05 21:21:07 +00:00
William S Fulton 7103a06849 Swig_offset_string moved to misc.c 2013-12-05 20:59:09 +00:00
William S Fulton 9d3fc0069c Add a few more types for the code beautifier 2013-12-02 08:37:09 +00:00
William S Fulton b65ba2a8db Minor code improvements 2013-11-29 07:33:55 +00:00
William S Fulton 44a883a057 Cosmetics/code beautification of nested class support 2013-11-29 07:29:58 +00:00
Vladimir Kalinin b63c4839fe Nested classes support
Closes #89
Squash merge branch 'master' of https://github.com/wkalinin/swig into wkalinin-nested

By Vladimir Kalinin
* 'master' of https://github.com/wkalinin/swig:
  CPlusPlusOut mode for Octave
  nested class illustration
  fixed "Abstract" flag for nested classes added an example enabled anonymous nested structs runtime test
  porting
  warnings disabled
  porting fixes
  java runtime tests ported
  nested class closing bracket offset fixed
  removed double nested template (not supported by %template parsing)
  template_nested test extended
  parent field made public
  property access fixed
  replaced tabs with spaces
  warning W-reorder
  deprecated warnings removed, derived_nested runtime test added
  optimized string indenting
  Nested classes indenting
  nested classes docs
  fixed the order in which flattened inner classes are added after the outer
  Private nested classes were getting into the type table.
  Java getProxyName() fix for nested classes fixes the case when nested classes is forward declared
  Fix for a case when a nested class inherits from the same base as the outer. (Base class constructor declaration is found first in this case)
  merge fix
  nested C struct first immediate declaration incorrectly renamed sample fixed
  tests updated to reflect nested classes support
  Java nested classes support (1)
  flattening should remove the link to the outer class
  access mode correctly set/restored for nested classes
  nested templates should be skipped while flattening (template nodes themselves, not expanded versions) also non-public nested classes should be ignored
  If nested classes are not supported, default behaviour is flattening, not ignoring flag "nested" is preserved, so, the nested classes can be ignored by user
  nested workaround test updated
  template instantiated within a class is marked as nested for ignoring purposes
  %ignore not applied to the nested classed, because "nested" flag is set too late
  typedef name takes precedence over the real name (reason?)
  unnamed structs should be processed for all the languages
  nested C struct instances are wrapped as "immutable"
  tree building
  typedef declaration for unnamed C structures fixed
  nested classes "flattening"
  fixed %ignoring nested classes
  renamed "nested" attribute to "nested:outer" added "nested" flag, to be used with $ignore (it is not removed while flattening) added nestedClassesSupported() function to the Language interface
  renamed "nested" attribute to "nested:outer" added "nested" flag, to be used with $ignore (it is not removed while flattening) added nestedClassesSupported() function to the Language interface
  tree iteration fix
  dirclassname variable names unified memory issue fixed
  merge error
  ignore unnamed structs for C++
  unnamed nested C structs naming & unnesting
  class added to classes hash under typedef name
  private nested classes skipped
  test updated due to nested templates support
  anonymous structs with inheritance fixed nested_class test to allow anonymous structs w/o declarator
  tests updated: nested workaround removed from namespace_class.i propagated nested template declaration to the C++ file
  injected members scope
  nested tempplates fixes, nested structures in "C" mode parsing added utility function "appendSibling" (like "appendChild")
  nested unnamed structures parsing fixes, access mode restored on nested class end, tdname is properly patched with outer class name prefix
  memory management fixes
  nested templates (1)
  Nested unnamed structs
  Nested class support (1)
  Nested class support (1)
2013-11-29 07:02:34 +00:00
William S Fulton 9c7d014389 T_STRING is now const char * instead of char *
Fixes Guile constant wrappers removing -Wwrite-strings g++ warning.
2013-10-17 18:36:59 +01:00
Vadim Zeitlin 72afb74f47 Add support for case conversion characters in regex substitutions.
Allow using Perl-like \l, \L, \u, \U and \E escape sequences in the
substitution string used with %rename("%(regex:/pattern/subst/)s").
This is useful for e.g. title casing all string after removing some prefix.

Closes #82
2013-10-15 07:17:56 +01:00
William S Fulton 7b08378145 Minor cleanup prior to merging to master 2013-10-11 21:48:45 +01:00
William S Fulton bcb7aee022 Merge branch 'master' into gsoc2009-matevz
Conflicts:
	Examples/Makefile.in
	Examples/guile/Makefile.in
	Lib/php/php.swg
	Makefile.in
	Source/CParse/parser.y
	configure.ac
2013-10-10 07:26:09 +01:00
Sylvestre Ledru 7a88729c87 Remove trailing spaces in the generated code.
No functional changes
2013-09-13 10:02:39 +02:00
William S Fulton f55ff50dd5 Skip the UTF-8 BOM of including files.
For avoiding illegal token error when parsing include files which have the UTF-8 BOM.

Closes #75.
2013-08-29 19:22:50 +01:00
Olly Betts 918c64af84 Fix comment typos 2013-06-04 12:44:28 +12:00
William S Fulton 439a353a36 Document patch #33 from previous commit and complete run time tests 2013-04-18 23:20:48 +01:00
Jesus Lopez 9be3235988 Support $descriptor() macro in fragments
Closes #36
2013-04-18 23:04:07 +01:00
William S Fulton fdea8a8f51 More useless code removal as detected by scan-build (LLVM/Clang)
using scan-build ./configure && scan-build make
2013-03-08 22:19:07 +00:00
Sylvestre Ledru e0b14786d6 Fix some useless code detected by scan-build (LLVM/Clang) 2013-03-08 20:53:18 +00:00
William S Fulton cfd8497f3e Cosmetic changes in SwigType_add_qualifier 2013-02-21 07:00:25 +00:00
Karl Wette ee2b46abe0 Fix SWIG's handling of qualified (e.g. const) variables of array type 2013-02-19 20:05:46 +00:00
Karl Wette 9d330a9970 Fix qualifier parsing in SwigType_add_qualifier()
- use list to ensure qualifiers are unique and sorted
- now allows 'qual' to contain multiple qualifiers
2013-02-19 20:05:45 +00:00
Karl Wette 70cd52f44d Use "(void)" instead of "()" when wrapping no-argument extension functions. 2013-02-18 22:39:39 +00:00
William S Fulton e44656cfe5 Add support for extern "C" thread_local 2013-02-08 18:45:29 +00:00
William S Fulton 7fcfdeee08 Fixes detecting if a variable is extern when using 'extern thread_local' 2013-02-08 07:38:10 +00:00
William S Fulton b725625e6f Add support for thread_local when specified with other legitimate storage class specifiers - extern and static 2013-02-08 06:36:39 +00:00
William S Fulton e805d5f925 Merge branch 'master' into gsoc2009-matevz
parser.y still to be fixed up

Conflicts:
	Doc/Devel/engineering.html
	Examples/Makefile.in
	Lib/allegrocl/allegrocl.swg
	Lib/csharp/csharp.swg
	Lib/csharp/enums.swg
	Lib/csharp/enumsimple.swg
	Lib/csharp/enumtypesafe.swg
	Lib/java/java.swg
	Lib/python/pydocs.swg
	Lib/r/rtype.swg
	Source/Include/swigwarn.h
	Source/Modules/octave.cxx
	Source/Modules/python.cxx
	Source/Modules/ruby.cxx
	Source/Swig/scanner.c
	Source/Swig/stype.c
	Source/Swig/swig.h
	configure.ac
2013-01-28 07:01:37 +00:00
William S Fulton 07c35d61e3 Fix generated code for rvalue references by converting functions returning an rvalue reference into something that can be taken the address of - via a const ref cast. Now the rvalue_reference tests compile under g++-4.7 (C# only atm) 2013-01-24 08:02:34 +00:00
William S Fulton 4b869de2e8 Cosmetic changes to previous (unicode literals) commit 2013-01-21 19:43:14 +00:00
William S Fulton 144e2ab7b4 Fixes to previous (unicode literals) commit 2013-01-21 19:42:44 +00:00
Vladimir Kalinin 7d800a655d Unicode literals 2013-01-21 19:09:56 +00:00
William S Fulton 7841a0d097 Remove cvs/svn Id strings 2013-01-12 01:21:16 +00:00
Brant K. Kyser 6cb5b5487f Use NSPACE_SEPARATOR rather than liter string for package seperator. 2013-01-08 21:28:13 -06:00
Brant K. Kyser 3c12306b21 Remove extra underscore from generated director names to maintain prevent breaking languages that do not support nspace. 2013-01-05 03:40:06 -06:00
Brant K. Kyser f6ce5f089f Qualify generated SwigDirector class names with namespaces 2013-01-03 21:26:08 -06: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 092e2104c7 More consistent use of DOH namespace
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13940 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-26 20:31:54 +00:00
William S Fulton dac89e16d4 const char * correctness fixes (in C code)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13939 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-26 20:30:37 +00:00
William S Fulton d93dc0f8e2 Distinguish between an "abstract" attribute on a class containing a list of abstract members and an "abstract" flag on pure virtual methods - renamed former to "abstracts"
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13935 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-24 14:13:58 +00:00
William S Fulton 41fed461fa Fix Swig_file_extension when the path has a . and there is no extension in the filename
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13905 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-18 00:45:39 +00:00
William S Fulton d918bddfc0 Fix segfaults when using filename paths greater than 1024 characters in length - use String * and heap instead of fixed size static char array buffers.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13904 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-18 00:45:18 +00:00
William S Fulton e450d4ebac Remove some possible buffer overflows
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13903 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-18 00:44:39 +00:00
William S Fulton 475c6c6ce0 Suppress some unchecked return value warnings for Coverity
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13902 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-18 00:44:19 +00:00
William S Fulton 0baa87809f Remove unnecessary non-null check
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13901 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-18 00:43:53 +00:00
William S Fulton 111b517372 Fix possible null dereferences
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13900 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-18 00:43:31 +00:00
William S Fulton 69b32d921f Remove pointless null check
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13899 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-18 00:43:09 +00:00
William S Fulton b107f57e59 NULL pointer clarification in Swig_new_subdirectory
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13897 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-16 19:39:50 +00:00
William S Fulton 5e13cd3475 Consider strchr failing in a few places
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13894 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-16 19:36:46 +00:00
William S Fulton ec08824561 Remove pointless null pointer check - Coverity REVERSE_INULL.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13893 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-16 19:35:33 +00:00
William S Fulton e475ce1d6b Fix race condition 'time of check time of use' - TOCTOU - when creating subdirectories.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13891 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-16 19:32:40 +00:00
William S Fulton aeebd394f3 Fix incorrect implicit constructor and destructor names in the symbol tables. Fix some feature matching issues for implicit destructors and implicit constructors and impliciti copy constructors added with %copyctor. Also improves consistency in named typemap lookup rules.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13882 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-13 22:19:47 +00:00
William S Fulton d4b7275f51 Fix Swig_scopename_last. It was truncating the first two letters of a symbol if the symbol did not contain any qualifiers. Does not seem to change much currently except some generated error messages in overloaded templated methods in classes. However the fix is needed for some commits shortly forthcoming.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13881 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-13 22:18:52 +00:00
William S Fulton 7aa339cb3f Swig_symbol_string_qualify for destructors - bug exposed after last commit when fully qualifying destructor names during typemap searches
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13879 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-13 22:17:10 +00:00
William S Fulton 421139a5fe Fix some subtle named output typemap lookup misses, the fully qualified name was not always being in all cases such as member variables
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13878 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-13 22:16:28 +00:00
William S Fulton b17a77c6ea Support special variable expansion in %extend.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13871 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-10-11 19:28:02 +00:00
William S Fulton 33098764b7 Remove unnecessary keyword warning when parsing 'using'
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13509 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-04 22:38:44 +00:00
William S Fulton 05839e646c Revert resolving template parameters
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13508 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-04 20:26:08 +00:00
William S Fulton e21bd46420 Resolve template parameters
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13507 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-04 20:25:43 +00:00
William S Fulton 0559f1f521 Fix Swig_symbol_clookup_no_inherit return value
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13505 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-04 20:24:47 +00:00
William S Fulton 3e33774c8c Show symbol type in symbol debug functions such as -debug-csymbols
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13503 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-04 20:23:31 +00:00
William S Fulton 6e6ce16e4e Fix using declarations combined with using directives with forward class
references.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13502 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-04 20:23:07 +00:00
William S Fulton 7b58300cbd Fix display of pointers on 64 bit systems, only 32 bit values were being shown.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13340 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-07-21 22:52:30 +00:00
William S Fulton b6c76bcd94 Cosmetic changes and some docs on some symbol functions
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13192 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-06-25 18:22:17 +00:00
William S Fulton 1ce0058256 Fix symbol table bug with combinations of using directives and using declarations
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13190 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-06-25 06:36:29 +00:00
William S Fulton 9e624db5bf Better display of parms when using -debug-module and -debug-top
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13093 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-05-15 19:51:41 +00:00
William S Fulton ef7a8a8253 Fix typemap method hiding regression introduced in swig-2.0.5 - rev 12764
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13071 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-05-11 21:23:37 +00:00
William S Fulton af1c6ac3c3 Merge trunk (up to just after swig 2.0.5 release - rev 13009) to gsoc2008-cherylfoil
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-cherylfoil@13017 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-04-27 18:55:37 +00:00
Olly Betts c4b344dcde Remove isarray variable which is set but never used (fixes GCC 4.6
warning)


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12965 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-04-05 01:19:32 +00:00
William S Fulton eee2a6a2f2 Add missing line and file number for some errors in %fragment declaration
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12941 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-03-21 06:48:51 +00:00
Joseph Wang 33e29f4847 set file_debug to false
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12930 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-03-18 04:58:08 +00:00
Joseph Wang 1ca411b423 Add more debug code into swig internals
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12928 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-03-17 18:40:38 +00:00
William S Fulton 29fd1e3ce4 Fix crash when requesting more matches than available in regex
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12904 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-01-27 20:55:32 +00:00
Vadim Zeitlin 9cdc66cc84 Don't override existing entries when inheriting various hashes.
Check if the value being inherited doesn't already exist for the derived
class: if it does, we must not overwrite it.

Fixes regression introduced in r12865.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12874 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-12-11 16:29:51 +00:00
Vadim Zeitlin 084425335f Fix bug which could result in %rename not taking effect for derived classes.
We used to modify the hash table that we iterated on in
Swig_name_object_inherit() and this could, and sometimes did, change the
iteration order in such way that not all entries we were looking for could be
found. In practice this means that sometimes the methods renamed or ignored in
the base class could be mysteriously not renamed or ignored in a derived
class.

Fix this by avoiding modifying the hash table in place and using another
temporary hash table instead.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12865 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-12-08 22:34:08 +00:00
William S Fulton 6d922f2ddd Fix #3433541 %typemap(in, numinputs=0) with 10+ arguments.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12849 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-11-28 19:35:44 +00:00
Olly Betts 5b8ca942ad This is a minor portability fix - isdigit() (and friends) are only portably defined for unsigned char values (though glibc extends them to work for signed char too) so this fixes this code to handle top bit set characters on non-glibc platforms where char is signed by default.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12846 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-11-28 04:08:25 +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 0463a49df5 Fix named output typemaps not being used when the symbol uses a qualifier and contains a number
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12831 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-11-01 23:06:53 +00:00
William S Fulton 24133bacd7 Remove numerous hard coded 'result' variable name in generated c/c++ wrappers. The variable name is now defined in just one place, making it possible to change the name easily if a target language so wishes - see cwrap.c.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12830 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-10-30 21:51:50 +00:00
William S Fulton 17c5f881ee warning fix
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12827 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-10-19 20:41:24 +00:00
William S Fulton fbd6d780b7 Remove unnecessary Identifier redefined warning when a using statement redefines a symbol. Behaviour is now like a duplicate typedef of the same symbol.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12826 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-10-14 23:37:16 +00:00
William S Fulton fa8915ef5f Fix regression introduced in swig-2.0.1 (r12157) leading to uncompilable code when using typedef and function pointers
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12814 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-09-19 20:54:39 +00:00
William S Fulton c794d08597 Fix %newobject when used in conjunction with %feature(ref). The code from the ref feature was not always being generated for the function specified by %newobject. Documentation for ref and unref moved from Python to the C++ chapter.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12783 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-08-23 19:29:10 +00:00
William S Fulton 7d038d4bd7 Fix scoping of forward class declarations nested within a class (for C++). Also fix %template and resolution of template parameters that are typedefs.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12764 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-07-26 19:34:23 +00:00
William S Fulton a9bf7737c1 Format changes for -debug-typedef
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12755 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-07-01 23:08:47 +00:00
William S Fulton e7d25dd2d7 Remove unimplemented functions
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12751 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-06-24 18:34:01 +00:00
William S Fulton d38e6bdf43 Fix incorrect typemaps being used for a symbol within a templated type
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12747 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-06-20 17:46:38 +00:00
William S Fulton b78392832f [Lua, Python, Tcl] C/C++ prototypes shown in error message when calling an overloaded method with incorrect arguments improved to show always show fully qualified name and if a const method. Also fixed other Lua error messages in generated code which weren't consistently using the fully qualified C++ name.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12655 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-05 06:23:02 +00:00
Stefan Zager 5fbcb711eb Fix for bug 3286333: infinite recursion with mutual "using namespace" clauses.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12640 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-14 04:22:03 +00:00
William S Fulton faf663c5af Swig_name_decl() now handles variables
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12617 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-08 22:49:40 +00:00
William S Fulton 93c1939370 Fix wrapping of const array typedefs which were generating uncompileable code
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12616 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-08 07:02:31 +00:00
William S Fulton a63d456f8a Remove redundant code highlighted by warnings in gcc-4.6
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12536 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-14 07:22:08 +00:00
William S Fulton 28af783d18 Templated smart pointers overloaded with both const and non const operator-> generated uncompilable code when the pointee was a class with either public member variables or static methods.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12512 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-02 22:30:05 +00:00
William S Fulton 4f616b5942 SF #3127633 Fix infinite loop in recursive typedef resolution.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12433 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-05 01:09:40 +00:00
William S Fulton 4a73d986dd Any 'using' statements in the protected section of a class were previously ignored with dirprot mode, certainly with Java and C#. Also directors - a call to a method being defined in the base class, not overridden in a subcalss, but again overridden in a class derived from the first subclass was not being dispatched correcly to the most derived class - affecting non-scripting languages. Fix for C# is based on recent fix for D.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12419 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-01 07:02:50 +00:00
William S Fulton 25c8689226 Use htmldoc's new --overflow option and fix overflow warnings in the pdf documentation generation
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12379 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-08 01:28:09 +00:00
William S Fulton babfccc072 Remove accidental commit of CHANGES.current
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12350 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-12-15 22:00:23 +00:00
William S Fulton 1adc50e730 constify SwigType * in many places
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12349 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-12-15 21:55:08 +00:00
William S Fulton 8f1bde9d81 Fix expansion in array typemaps
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12347 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-12-14 21:38:36 +00:00
William S Fulton 02750e80a3 Fix #3127394 - use of network paths on Windows/MSys.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12322 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-12-06 20:43:56 +00:00
Vadim Zeitlin f6cab0170a Ignore non-matching regex renames when searching renames list.
Skip over %renames with non-matching %(regex)s expansion when looking for the
one to apply to the given name. This allows to have multiple anonymous renames
using regex as now the first _matching_ one will be used instead of always
using the first one and ignoring all the rest of them.

Extend unit tests to verify that applying two anonymous %renames does work as
expected.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12293 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-11-16 14:09:39 +00:00
Vadim Zeitlin 953c4abaca Use rename list and not hash for renames with regextarget attribute.
Renames which are regular expressions can't be put in the regex hash as they
don't literally match the real declarations names. Instead, put them in the
rename list against which we will match the declarations names later.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12292 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-11-16 14:09:09 +00:00
Olly Betts 28e277f8c5 Fix typo "the the" -> "the"
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12285 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-10-19 06:31:31 +00:00
William S Fulton c9ede7e622 Fix unary scope operator (::) (global scope) regression introduced in 2.0.0. The mangled symbol names were incorrect, sometimes resulting in types being incorrectly treated as opaque types.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12264 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-10-13 05:48:59 +00:00
William S Fulton 3219746776 Apply patch #3066958 from Mikael Johansson to fix default smart pointer handling when the smart pointer contains both a const and non-const operator->.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12240 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-10-03 13:12:00 +00:00
William S Fulton 766ed8db37 Add -pcreversion option to display PCRE version information
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12239 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-10-01 23:52:46 +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 d1e6643161 Expand the family of debug print functions for displaying DOH types. Provide gdb support for calling these. Document improved debugging experience.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12221 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-15 20:17:11 +00:00
William S Fulton cfcad4ab69 Fix/Workaround unexpected call to Hash_str() when running make director_protected_overloaded.cpptest and director_using.cpptest
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12219 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-14 18:50:04 +00:00
William S Fulton 122bc852f9 Fix #2149523 - Incorrect line number reporting in errors after parsing macros. Remove extraneous extra line in preprocessed output which would sometimes lead to error/warning messages two lines after the end of the file
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12211 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-10 06:08:45 +00:00
Vadim Zeitlin 024ed6ce2a Fix bug in applying regex replacement to non-matching strings.
We didn't handle pcre_exec() return code properly and so the replacement could
be still done even if there was no match if the replacement part contained
anything else than back-references (in this, the only tested so far, case the
replacement was still done but the result turned out to be empty and the
calling code assumed the regex didn't match).

Do check for PCRE_ERROR_NOMATCH now and also give an error message if another
error unexpectedly occurred.

Add a test case for the bug that was fixed.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12187 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-08-14 14:12:23 +00:00
William S Fulton af96789c14 Minor comment changes and html changes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12181 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-07-23 19:34:17 +00:00
Vadim Zeitlin 587d843521 Remove old experimental rxspencer encoder and rxsmatch function.
They are replaced with the new, officially supported PCRE-based regex and
regexmatch.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12175 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-07-22 17:02:35 +00:00
Vadim Zeitlin 70c5bb5a47 Add support for "[not]regexmatch" and "regextarget" to %rename.
"regexmatch" and "notregexmatch" can be used with anonymous %renames in the
same way as "match" and "notmatch" while "regextarget" specifies that the
argument of a non-anonymous %rename should be interpreted as a regular
expression.

Document the new functions.

Also add a new unit test for %regex also testing regexmatch &c and provide
test code for C# and Java verifying that it works as intended.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12174 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-07-22 17:02:10 +00:00
Vadim Zeitlin c4e9043288 Add support for regex encoder for %rename.
This allows to write %rename("%(regex:/pattern/subst/)s") to apply a
regex-based replacement to a declaration name.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12170 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-07-22 17:00:37 +00:00
William S Fulton 25ff4e4927 merge revisions 11877-12162 from trunk to gsoc2009-matevz
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@12164 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-07-20 23:35:40 +00:00
William S Fulton ab1cd03979 merge revisions 11243-11872 from trunk to gsoc2009-matevz
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@12162 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-07-20 21:58:41 +00:00
William S Fulton d8cc75946b Improved C++0x rvalue reference implementation differentiating lvalue and rvalue references. The previous implementation treated rvalue references as lvalue references which leads to a number of different wrapping issues.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@12160 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-07-18 00:19:22 +00:00
William S Fulton 568607c5ea Fix wrapping of function pointers and member function pointers when the function returns by reference
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12157 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-07-16 18:45:22 +00:00
William S Fulton adffcd60e1 Raw string literal changes in paper N3077 changes delimiters to use round brackets instead of square brackets
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@12152 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-06-25 22:54:45 +00:00
Olly Betts 9ed2d0165c Fix comment typo.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12141 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-06-21 03:44:29 +00:00
William S Fulton 95a3eb5a7d code style: fix inconsistent NULL pointer comparisons
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12137 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-06-17 23:49:12 +00:00
William S Fulton e2ce97f397 Add the ability for special variable macros to call other special variable macros. Also added additional diagnostics when using -debug-tmsearch. Add tests for std::vector of shared_ptr.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12059 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-26 23:22:49 +00:00
William S Fulton 1be936380f S_ISDIR is defined for mingw gcc but not visual c++
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12045 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-24 06:02:11 +00:00
Olly Betts bf1d3f0714 Remove superfluous semicolons.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12034 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-21 07:10:12 +00:00
Olly Betts 6a9a167e8e Fix typo in comment.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12025 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-14 04:10:19 +00:00
Olly Betts 108f826a76 Fix typo in example in comment.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12024 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-12 23:56:38 +00:00
William S Fulton 68308583b7 Apply patch #2955146 from Sergey Satskiy to fix expressions containing divide by operator in constructor initialization lists.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12013 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-07 19:10:41 +00:00
William S Fulton 03bd7005bb Fix typemap delete regression introduced in rev 11838
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12008 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-03 22:58:27 +00:00
William S Fulton efd200ffe2 Typemap matching rules enhancement for non-default typemaps. Previously all qualifiers were stripped in one step, now they are stripped one at a time starting with the left most qualifier.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12007 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-02 21:35:02 +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 b6c4ea90b6 remove old default SWIGTYPE reduction code
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11960 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-04-01 18:33:27 +00:00
William S Fulton bdb136d611 Change typemap matching rules for the default type (SWIGTYPE) to follow template partial specialization type deduction. Fixes some containers of const pointers. SWIGTYPE*& typemps removed and replaced with SWIGTYPE *const&.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11958 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-04-01 18:26:37 +00:00
William S Fulton 163d15e2e3 remove debug printout
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11948 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-03-16 22:20:41 +00:00
William S Fulton 4f88d641af Better handling of file paths containing multiple path separators. Fix recent regression incorrectly detecting a directory on Windows when the output directory is not the current directory.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11944 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-03-13 22:28:24 +00:00
William S Fulton 978dd1f48f Windows portability fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11925 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-03-08 07:35:06 +00:00
William S Fulton 30afaae7df Add new GPL license headers to all source files in this branch
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@11914 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-03-06 12:06:22 +00:00
William S Fulton 02fbe37ae6 Add new GPL license headers to source files added in this branch
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-cherylfoil@11911 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-03-06 11:47:21 +00:00
William S Fulton 7f53260203 merge revisions 11872:11876 from trunk to gsoc2009-matevz branch - license changes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@11905 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-03-06 00:51:54 +00:00
William S Fulton 2b1f0a14bc merge revisions 11872:11876 from trunk to gsoc2008-cherylfoil branch - license changes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-cherylfoil@11900 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-03-05 23:43:39 +00:00
William S Fulton 1253657bb4 Add improved namespace support - the nspace feature, working for Java only at the moment.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11896 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-03-04 21:27: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 6c275f00d9 Add in possibility to use scopes in target language module symbol table
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11855 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-02-12 23:20:58 +00:00
William S Fulton 207ba5ce39 Fix #1807329 - When Makefile dependencies are being generated using the -M family of options on Windows, the file paths have been corrected to use single backslashes rather than double backslashes as path separators.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11847 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-02-08 23:12:27 +00:00
William S Fulton 590567d57f Factor out the common code within typemap_search() into typemap_search_helper()
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11838 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-02-01 20:23:34 +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 a4d28ba148 Remove unnecessary duplicate typemap lookup
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11833 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-01-29 06:55:38 +00:00
William S Fulton d02f543dbc Fix typemap matching bug when a templated type has a typemap both specialized and not specialized - the wrong typemap would sometimes be used
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11831 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-01-28 07:25:59 +00:00
William S Fulton 83576031c3 Add another example for clarification in SwigType_templateprefix()
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11830 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-01-28 07:22:42 +00:00
William S Fulton f112e4bac1 Fix #2933129 - typemaps not being found when the unary scope operator (::) is used to denote global scope
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11827 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-01-22 20:39:54 +00:00
William S Fulton 3b06d6e442 subtle fix to -Fmicrosoft format adding in missing space
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11820 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-01-10 22:51:19 +00:00
William S Fulton 237f64a6e1 subtle fix to -Fmicrosoft format adding in missing space
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11818 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-01-10 22:37:28 +00:00
William S Fulton 71c8881dda Some more file and line numbering reporting consistency fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11814 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-01-09 20:00:27 +00:00
William S Fulton 5a3ba0d607 Modify -debug-tags output to use standard file name/line reporting so that editors can easily navigate to the appropriate line
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11811 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-01-09 17:20:11 +00:00
William S Fulton 1b3ca38023 Slight change to warning, error and diagnostic reporting. The warning number is no longer shown within brackets. This is to help default parsing of warning messages by other tools, vim on Unix in particular.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11809 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-01-09 00:42:01 +00:00