SWIG-4.4.1 released
SWIG-4.4.0 released
SWIG-4.3.1 released
I can imagine a pile of difficulties in the implementation and ambiguities in cases such as: void x(int& a, int& b, int& c, int& d); and multiple variations of the multi-arg typemaps in this ticket being present. If just the first name has to match, it is unambiguous as to whether or not the multi-argument typemap matches (once the subsequent parameters are checked). I suppose some more flexible rules around such ambiguities could be defined and implemented, however, I would document it as it works...
Lifecycle of pointers to 'concrete' sub-objects (C#-binding patch included)
The solution was documented in the C# docs last year, but was only detailed for accessor methods to member variables. The same technique can be used for direct member access and I've just enhanced the docs with this, see the version in master: https://htmlpreview.github.io/?https://github.com/swig/swig/blob/master/Doc/Manual/CSharp.html#CSharp_memory_management_member_variables . I can't see the swig-2.0.4-csharp-concrete.patch being accepted as is, but maybe with improvements as some sort of special...
SWIG-4.3.0 released
The documentation, https://swig.org/Doc4.1/SWIGPlus.html#SWIGPlus_template_class_inheritance, does clearly state that you need to instantiate a template before it is used as a base class. Any change from this behaviour will be a major change.
[csharp] getCPtr should use object.ReferenceEquals
I'm not sure it will be easy to keep the code based maintained to always cover this corner case. The relevant typemaps can be easily changed by the user to use ReferenceEquals instead and so I'm closing as won't change. I can't there being a runtime overhead when there is no operator== overload.
SWIG-4.2.1 released
Identifier warning for friend methods in a namespace
Fixed in a6ab9145115aa124ff9c98e2b3c39fde9f205760
Namespace breaks %ignore with unbound C++ operator<<
Fixed by a6ab9145115aa124ff9c98e2b3c39fde9f205760. All 6 of the %ignore directives shown now work.
SWIG-4.2.0 released
SWIG-4.2.0 released
SWIG-4.2.0 released
Swig, perl5 and union
The union variable name is called intRep and is an anonymous union, that is, it does not have any type name. It is thus not possible to create a type outside of Object to assign to intRep. Consider a small change to give the union a type name, say IntRepType as follows: typedef struct Object { int objtype; union IntRepType { int ivalue; double dvalue; char *strvalue; void *ptrvalue; } intRep; } Object; void tester() { /* approach (1) */ obj.intRep.dvalue = 1.23; /* approach (2) */ union IntRepType...
c++ private assignment operator not obeyed for arrays
Fixed in https://github.com/swig/swig/commit/650aad82ede59abe1a9355c274e213d33ae9d543.
swig tries to call private constructor
Fixed in https://github.com/swig/swig/commit/f11bffcb1993eb5435b093f2641f857ccb674a77.
'using' directive may prevent constructor wrapping
Fixed in 93732bb19562534c81c537b8a83e38451556415c for swig-4.2.0.
template constructor of template class not recognized
Corrected testcase: %inline %{ template <typename T, typename U> struct MyClass { template<typename P> // MyClass<T,D>(P p) MyClass<T,U>(P p) { } }; %} %template(MyClassImpl) MyClass<int, int>; Note that MyClass<T,U> is not valid syntax from C++20 onwards, but SWIG continues to support it. The warning no longer appears in master, so this issue is fixed for swig-4.2.0.
Your code above is invalid. However, if it is corrected: %inline %{ class Base { public: virtual void f(int n) = 0; void f(double another_representation_of_n) { } }; //And a derived class class Derived : public Base { public: Derived() {} using Base::f; virtual void f(int n) {} }; %} Then Derived does not have a constructor and this is incorrect. There is an easy workaround for now and that is to swap two lines around as such: virtual void f(int n) {} using Base::f;
-copyctor bug?!
This bug is a problem with non-const copy constructors in an inheritance chain. SWIG always assumed the implicit copy constructor was defined with a const reference parameter. For reference, https://en.cppreference.com/w/cpp/language/copy_constructor outlines nicely when the implicit constructor uses a const or non-const reference parameter. Fixed in 74e1deef6bd86135ee2a5f007b6347202813d143.
Duplicate of https://github.com/swig/swig/issues/1603 which is now fixed
Parse error on two parameter template template argument
partial specialization not recognized
Duplicate of https://github.com/swig/swig/issues/1300 which is now fixed.
SWIG-4.1.1 released
SWIG-4.1.0 released
Multiple modules leads to unhandled exception
I couldn't reproduce using swig-1.3.33 or swig-4.1.0 with python-2.7.17, Ubuntu 18.04.6 64-bit. Also could not produce using swig-1.3.33 with python-2.5.6, Ubuntu 14.04.5 64-bit. Closing as can't reproduce. Please re-open if reproducible on a modern Linux distribution.
[c#] Features csprepend, csappend & insert directive csharp
The 'cscode' typemap and the 'pre' and 'post' typemap attributes should cover what this patch is trying to do.
SWIG-4.1.0 released
utf8 string typemaps for C#
Solution in https://github.com/swig/swig/issues/1233 has been adopted instead, mainly to avoid the use of unsafe.
swig always interprets quotes in SWIG_LIB as literals
This is normal Windows behaviour to include the quotes in the environment variable, so don't include them of they are not part of the directory name!
Java director connector not thread safe
Should be fixed now, see https://github.com/swig/swig/issues/1862.
SWIG-4.0.2 released
SWIG-4.0.2 released
Add support for SWIG - http://www.swig.org. SWIG is an extension to C++ hence the implementation is derived from CppLexer with additions to identify SWIG's special variables, such as _type, and the SWIG directives which begin with %.
SwigLexer refinements for SWIG directives, add support for stringification of types and special variables, also set priority for SWIG.
Change default for SWIG directives
Add a mime type for SWIG files. Choose 'text/swig' - a Google search indicates it isn't being used. Note that 'text/x-swig' is not used as the x- prefix is deprecated, see http://tools.ietf.org/html/rfc6648.
Fix for SWIG's ##
Update aliases and mimetypes mapping for SWIG
Regular expressions changed for SWIG - same regex just written differently
Detect SWIG directives in 'analyse_text'. Some commonly known directives are detected with high priority. Unlisted, but possible SWIG directives are given a lower priority, but there is a conflict with Matlab comments. Perhaps the Matlab lexer should be improved?
Merge from https://bitbucket.org/birkenfeld/pygments-main
Fix merge from https://bitbucket.org/birkenfeld/pygments-main
Update AUTHORS for SWIG Lexer
Less greedy detection of SWIG directives in 'analyse_text'
SWIG-4.0.1 released
Works great. Post your queries on the swig-user mailing list. I suggest you modify one of the examples and post that for help on the mailing list.
SWIG-4.0.0 released
[java] support for iterator in std::map?
This is available in swig-4.0.0
Add wrapping for std::set in C# (.Net 4)
swig-4.0.0 contains support for std::set wrappers for C#.
java std_map.i does not support iteration
This is available in swig-4.0.0.
cffi clos wrapper code out of date
Closing all open CFFI issues as CFFI has been disabled, please see https://github.com/swig/swig/issues/1447
CFFI improperly handles complex #defines
Closing all open CFFI issues as CFFI has been disabled, please see https://github.com/swig/swig/issues/1447
Anonymous unions in structs go out of order with cffi (and fails with uffi and clisp)
Closing all open CFFI issues as CFFI has been disabled, please see https://github.com/swig/swig/issues/1447
Static arrays inside C-Structs, CFFI
Closing all open CFFI issues as CFFI has been disabled, please see https://github.com/swig/swig/issues/1447
[cffi] Fix CFFI conversion of constant expressions
Closing all open CFFI issues as CFFI has been disabled, please see https://github.com/swig/swig/issues/1447
[cffi] Fix CFFI conversion of constant expressions
Closing all open CFFI issues as CFFI has been disabled, please see https://github.com/swig/swig/issues/1447
CFFI: Fix %rename; fix -noswig-lisp
Closing all open CFFI issues as CFFI has been disabled, please see https://github.com/swig/swig/issues/1447
Put the code posted at the bottom into file a file called runme.c and run cppcheck: $ cppcheck runme.c Checking runme.c... [runme.c:30]: (error) Memory leak: s.str Checking runme.c: WORKAROUND... $ The memory leak is a false positive unless WORKAROUND is defined. The workaround requires an extra temporary variable, which is odd! // file runme.c #include <string.h> #include <stdlib.h> #include <stdio.h> typedef struct String { char *str; } String; typedef struct Object { String *data; } Object; Object...
intrusive_ptr support for perl5/php
No response, closing.
Fix for the win32 issue with MAX_PATH
Discussion of this patch has moved to https://github.com/swig/swig/pull/1252.
Works for me. Please try with latest version and report back if still a problem.
Permission denied with SWIG 3.09 under Windows 7 64-bit
If this was committed, can this issue be closed?
+1 for removing gcj detection and tests. I've never heard of anyone using it.
basic support for std::list in Java
Superceded by https://github.com/swig/swig/pull/674.
[c#] std_list.i for c#
Superceded by https://github.com/swig/swig/pull/674. If there is any functionality missing compared to your version, please let us know.