Affects marshalling of negative numbers from Java to C only.
A cast to signed long long in the C layer will now result in the expected value.
Closes#623.
Use SwigInterface as a suffix to the class name when naming the
interface class instead of using a simple I as a prefix.
%feature_custom can be used to use I as a prefix if so desired.
This is a simple expansion expanding to the name of the interface and is
not qualified like $javainterfacename and $csinterfacename.
Expansion within typemaps is much like $javainterfacename otherwise.
Note that expansion within the pure java code typemap,
'javainterfacecode' and similarly pure C# code typemap,
'csinterfacecode' works like $javaclassname/$csclassname and
$&interfacename should not be used, just $interfacename.
Support expansion of name attribute in: %feature("interface", name="%s")
%s expands to the proxy class name and all the usual %rename functions
can be used (regex, strip, camelcase etc) to derive the interface name
from the proxy class name.
Rename $interfacename family of special variables to $javainterfacename for Java
Rename $interfacename family of special variables to $csinterfacename for C#
This is to free up $interfacename for simple interface name expansion in forthcoming commit
pgcpp was turned off but it is still needed for the interface feature
to prevent premature garbage collection of the proxy class being passed
into the C++ layer.
* interfaces:
Remove unnecessary interfaces for concrete classes
cosmetic code formatting changes
Correct interface name attributes that are internal
interface macro changes to support templates
Test non-virtual method in Derived classes
interface tests for a most derived class inheriting the interfaces further up the chain
Rename GetCPtr/getCPtr to SWIGInterfaceUpcast
interface feature support for const ref pointers (used by the STL)
Interface feature support for arrays
More interface feature testing for return values
interface feature support for passing by value
interface feature support for references
Multiple inheritance parameters as pointers testing
Simplify multiple_inheritance_abstract Java runtime test
Warning fixes
Rename test functions in multiple_inheritance_abstract testcase
Formatting fixes in generated code for interface feature
Cosmetic spacing changes in test case
interface feature typemap corrections to handle NULL pointers
interface test added
javadirectorin fix
interface implementation visibility
interface inheritance (2)
interface inheritance (1)
feature:interface ported to Java
propagate non-abstract "interface" base methods (3)
propagate non-abstract "interface" base methods (2)
propagate non-abstract "interface" base methods (1)
namespace support added GetCPtr now returns HandleRef "feature:interface:name" is now mandatory attribute
interfaces (1)
interfaces (1)
Conflicts:
Source/Modules/csharp.cxx
Source/Modules/java.cxx
The C++ type must be last in the argument list to support templates with
multiple arguments which are separated by commas.
Affects DECLARE_INTERFACE and DECLARE_INTERFACE_RENAME.
Notably it now works for "unsigned char*" strings.
Add a test to check that it now works in Java and also showing that it already
worked for the other languages with support for this typemap.
When passing a byte array from c++ to Java using the director feature, the generated jni code does not release a temporary byte array.
This is the typemap specified in Java.swg:
%typemap(directorin, descriptor="[B") (char *STRING, size_t LENGTH) {
jbyteArray jb = (jenv)->NewByteArray($2);
(jenv)->SetByteArrayRegion(jb, 0, $2, (jbyte *)$1);
$input = jb;
}
%typemap(directorargout) (char *STRING, size_t LENGTH)
%{(jenv)->GetByteArrayRegion($input, 0, $2, (jbyte *)$1); %}
Notice that the call to NewByteArray doesn't contain a symmetric release logic as the SetByteArrayRegion/GetByteArrayRegion does.
Closes#386
clang++ using -stdlib=libc++ defines const_reference as a class,
to map boolean vectors onto a bit set. Because swig does
not "see" the type as "const &" it generates incorrect code for this case,
generating a declaration like:
const_reference result;
When const_reference is a typedef to 'bool' as is the case with stdlibc++
this works. When this is actually a constant reference, this is clearly
invalid since it is not initialized. For libc++, this is a class
which cannot be default constructed, resulting in an error. The fix
is to explicitly define the various accessor extensions as having a
bool return type for this specialization.