diff --git a/SWIG/Lib/csharp/csharp.swg b/SWIG/Lib/csharp/csharp.swg new file mode 100644 index 000000000..1aaa02345 --- /dev/null +++ b/SWIG/Lib/csharp/csharp.swg @@ -0,0 +1,704 @@ +/* ----------------------------------------------------------------------------- + * csharp.swg + * + * CSharp typemaps + * ----------------------------------------------------------------------------- */ + +//%include "stl.i" + +//Initial revision of this module - everything is liable to change!! +%insert(runtime) %{ + +#include +#include +#define DllExport __declspec( dllexport ) +%} + +/* The jni, jtype and jstype typemaps work together and so there should be one of each. + * The jni typemap contains the JNI type used in the JNI (C/C++) code. + * The jtype typemap contains the Java type used in the Java module class. + * The jstype typemap contains the Java type used in the Java proxy class. */ + +/* Primitive types */ +%typemap(jni) bool, const bool & "bool" +%typemap(jni) char, const char & "char" +%typemap(jni) signed char, const signed char & "char" +%typemap(jni) unsigned char, const unsigned char & "short" +%typemap(jni) short, const short & "short" +%typemap(jni) unsigned short, const unsigned short & "int" +%typemap(jni) int, const int & "int" +%typemap(jni) unsigned int, const unsigned int & "unsigned int" +%typemap(jni) long, const long & "int" +%typemap(jni) unsigned long, const unsigned long & "long" +%typemap(jni) long long, const long long & "long" +%typemap(jni) unsigned long long, const unsigned long long & "object" +%typemap(jni) float, const float & "float" +%typemap(jni) double, const double & "double" +%typemap(jni) char * "char *" +%typemap(jni) void "void" + +%typemap(jtype) bool, const bool & "bool" +%typemap(jtype) char, const char & "char" +%typemap(jtype) signed char, const signed char & "sbyte" +%typemap(jtype) unsigned char, const unsigned char & "byte" +%typemap(jtype) short, const short & "short" +%typemap(jtype) unsigned short, const unsigned short & "ushort" +%typemap(jtype) int, const int & "int" +%typemap(jtype) unsigned int, const unsigned int & "uint" +%typemap(jtype) long, const long & "int" +%typemap(jtype) unsigned long, const unsigned long & "uint" +%typemap(jtype) long long, const long long & "long" +%typemap(jtype) unsigned long long, const unsigned long long & "Math.BigInteger" +%typemap(jtype) float, const float & "float" +%typemap(jtype) double, const double & "double" +%typemap(jtype) char * "string" +%typemap(jtype) void "void" + +%typemap(jstype) bool, const bool & "bool" +%typemap(jstype) char, const char & "char" +%typemap(jstype) signed char, const signed char & "sbyte" +%typemap(jstype) unsigned char, const unsigned char & "byte" +%typemap(jstype) short, const short & "short" +%typemap(jstype) unsigned short, const unsigned short & "ushort" +%typemap(jstype) int, const int & "int" +%typemap(jstype) unsigned int, const unsigned int & "uint" +%typemap(jstype) long, const long & "int" +%typemap(jstype) unsigned long, const unsigned long & "uint" +%typemap(jstype) long long, const long long & "long" +%typemap(jstype) unsigned long long, const unsigned long long & "Math.BigInteger" +%typemap(jstype) float, const float & "float" +%typemap(jstype) double, const double & "double" +%typemap(jstype) char * "string" +%typemap(jstype) void "void" + +%typemap(jni) char[ANY] "char *" +%typemap(jtype) char[ANY] "string" +%typemap(jstype) char[ANY] "string" + +/* JNI types */ +%typemap(jni) jboolean "bool" +%typemap(jni) jchar "char" +%typemap(jni) jbyte "byte" +%typemap(jni) jshort "short" +%typemap(jni) jint "int" +%typemap(jni) jlong "long" +%typemap(jni) jfloat "float" +%typemap(jni) jdouble "double" +%typemap(jni) jstring "string" +%typemap(jni) jobject "object" +%typemap(jni) jbooleanArray "booleanArray" +%typemap(jni) jcharArray "charArray" +%typemap(jni) jbyteArray "byteArray" +%typemap(jni) jshortArray "shortArray" +%typemap(jni) jintArray "intArray" +%typemap(jni) jlongArray "longArray" +%typemap(jni) jfloatArray "floatArray" +%typemap(jni) jdoubleArray "doubleArray" +%typemap(jni) jobjectArray "objectArray" + +%typemap(jtype) jboolean "bool" +%typemap(jtype) jchar "char" +%typemap(jtype) jbyte "byte" +%typemap(jtype) jshort "short" +%typemap(jtype) jint "int" +%typemap(jtype) jlong "long" +%typemap(jtype) jfloat "float" +%typemap(jtype) jdouble "double" +%typemap(jtype) jstring "string" +%typemap(jtype) jobject "Object" +%typemap(jtype) jbooleanArray "bool[]" +%typemap(jtype) jcharArray "char[]" +%typemap(jtype) jbyteArray "byte[]" +%typemap(jtype) jshortArray "short[]" +%typemap(jtype) jintArray "int[]" +%typemap(jtype) jlongArray "long[]" +%typemap(jtype) jfloatArray "float[]" +%typemap(jtype) jdoubleArray "double[]" +%typemap(jtype) jobjectArray "Object[]" + +%typemap(jstype) jboolean "bool" +%typemap(jstype) jchar "char" +%typemap(jstype) jbyte "byte" +%typemap(jstype) jshort "short" +%typemap(jstype) jint "int" +%typemap(jstype) jlong "long" +%typemap(jstype) jfloat "float" +%typemap(jstype) jdouble "double" +%typemap(jstype) jstring "String" +%typemap(jstype) jobject "Object" +%typemap(jstype) jbooleanArray "bool[]" +%typemap(jstype) jcharArray "char[]" +%typemap(jstype) jbyteArray "byte[]" +%typemap(jstype) jshortArray "short[]" +%typemap(jstype) jintArray "int[]" +%typemap(jstype) jlongArray "long[]" +%typemap(jstype) jfloatArray "float[]" +%typemap(jstype) jdoubleArray "double[]" +%typemap(jstype) jobjectArray "Object[]" + +/* Non primitive types */ +%typemap(jni) SWIGTYPE "int" +%typemap(jtype) SWIGTYPE "IntPtr" +%typemap(jstype) SWIGTYPE "$&javaclassname" + +%typemap(jni) SWIGTYPE [] "int" +%typemap(jtype) SWIGTYPE [] "IntPtr" +%typemap(jstype) SWIGTYPE [] "$javaclassname" + +%typemap(jni) SWIGTYPE * "int" +%typemap(jtype) SWIGTYPE * "IntPtr" +%typemap(jstype) SWIGTYPE * "$javaclassname" + +%typemap(jni) SWIGTYPE & "int" +%typemap(jtype) SWIGTYPE & "IntPtr" +%typemap(jstype) SWIGTYPE & "$javaclassname" + +%typemap(jni) enum SWIGTYPE "int" +%typemap(jtype) enum SWIGTYPE "int" +%typemap(jstype) enum SWIGTYPE "int" + +/* pointer to a class member */ +%typemap(jni) SWIGTYPE (CLASS::*) "int" +%typemap(jtype) SWIGTYPE (CLASS::*) "IntPtr" +%typemap(jstype) SWIGTYPE (CLASS::*) "$javaclassname" + +/* The following are the in, out, freearg, argout typemaps. These are the JNI code generating typemaps for converting from Java to C and visa versa. */ + +/* primitive types */ +%typemap(in) bool, + char, + signed char, + unsigned char, + short, + unsigned short, + int, + unsigned int, + long, + unsigned long, + long long, + float, + double, + enum SWIGTYPE +%{ $1 = ($1_ltype)$input; %} + +%typemap(out) bool %{ $result = (bool)$1; %} +%typemap(out) char %{ $result = (char)$1; %} +%typemap(out) signed char %{ $result = (char)$1; %} +%typemap(out) unsigned char %{ $result = (unsigned char)$1; %} +%typemap(out) short %{ $result = (short)$1; %} +%typemap(out) unsigned short %{ $result = (unsigned short)$1; %} +%typemap(out) int %{ $result = (int)$1; %} +%typemap(out) unsigned int %{ $result = (unsigned int)$1; %} +%typemap(out) long %{ $result = (int)$1; %} +%typemap(out) unsigned long %{ $result = (long)$1; %} +%typemap(out) long long %{ $result = (long)$1; %} +%typemap(out) float %{ $result = (float)$1; %} +%typemap(out) double %{ $result = (double)$1; %} +%typemap(out) enum SWIGTYPE %{ $result = (int)$1; %} + + +/* unsigned long long */ +/* Convert from BigInteger using the toByteArray member function */ +%typemap(in) unsigned long long { + jclass clazz; + jmethodID mid; + jbyteArray ba; + jbyte* bae; + jsize sz; + int i; + + if (!$input) { + //SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "BigInteger null"); + return $null; + } + clazz = JCALL1(GetObjectClass, jenv, $input); + mid = JCALL3(GetMethodID, jenv, clazz, "toByteArray", "()[B"); + ba = (jbyteArray)JCALL2(CallObjectMethod, jenv, $input, mid); + bae = JCALL2(GetByteArrayElements, jenv, ba, 0); + sz = JCALL1(GetArrayLength, jenv, ba); + $1 = 0; + if (bae[0] == 0) { + for(i=sz-1; i>0; i-- ) { + $1 = ($1 << 8) | (unsigned char)bae[sz-i]; + } + } + else { + for(i=sz; i>=0; i-- ) { + $1 = ($1 << 8) | (unsigned char)bae[sz-1-i]; + } + } + JCALL3(ReleaseByteArrayElements, jenv, ba, bae, 0); +} + +/* Convert to BigInteger - byte array holds number in 2's complement big endian format */ +%typemap(out) unsigned long long { + jbyteArray ba = JCALL1(NewByteArray, jenv, 9); + jbyte* bae = JCALL2(GetByteArrayElements, jenv, ba, 0); + jclass clazz = JCALL1(FindClass, jenv, "java/math/BigInteger"); + jmethodID mid = JCALL3(GetMethodID, jenv, clazz, "", "([B)V"); + jobject bigint; + int i; + + bae[0] = 0; + for(i=1; i<9; i++ ) { + bae[i] = (jbyte)($1>>8*(8-i)); + } + + JCALL3(ReleaseByteArrayElements, jenv, ba, bae, 0); + bigint = JCALL3(NewObject, jenv, clazz, mid, ba); + $result = bigint; +} + +/* char * - treat as String */ +%typemap(in) char * { + $1 = $input; +} +//%typemap(freearg) char * { if ($1) JCALL2(ReleaseStringUTFChars, jenv, $input, $1); } +//%typemap(out) char * { if($1) $result = JCALL1(NewStringUTF, jenv, $1); } + +%typemap(out) void "" + +/* primitive types by reference */ +%typemap(in) const bool & (bool temp), + const char & (char temp), + const signed char & (signed char temp), + const unsigned char & (unsigned char temp), + const short & (short temp), + const unsigned short & (unsigned short temp), + const int & (int temp), + const unsigned int & (unsigned int temp), + const long & (long temp), + const unsigned long & (unsigned long temp), + const long long & (long long temp), + const float & (float temp), + const double & (double temp) +%{ temp = ($*1_ltype)$input; +$1 = &temp; %} + +%typemap(out) const bool & %{ $result = (bool)*$1; %} +%typemap(out) const char & %{ $result = (char)*$1; %} +%typemap(out) const signed char & %{ $result = (byte)*$1; %} +%typemap(out) const unsigned char & %{ $result = (uchar)*$1; %} +%typemap(out) const short & %{ $result = (short)*$1; %} +%typemap(out) const unsigned short & %{ $result = (ushort)*$1; %} +%typemap(out) const int & %{ $result = (int)*$1; %} +%typemap(out) const unsigned int & %{ $result = (uint)*$1; %} +%typemap(out) const long & %{ $result = (int)*$1; %} +%typemap(out) const unsigned long & %{ $result = (uint)*$1; %} +%typemap(out) const long long & %{ $result = (long)*$1; %} +%typemap(out) const float & %{ $result = (float)*$1; %} +%typemap(out) const double & %{ $result = (double)*$1; %} + +/* const unsigned long long & */ +/* Similar to unsigned long long */ +%typemap(in) const unsigned long long & (unsigned long long temp) { + jclass clazz; + jmethodID mid; + jbyteArray ba; + jbyte* bae; + jsize sz; + int i; + + if (!$input) { + //SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "BigInteger null"); + return $null; + } + clazz = JCALL1(GetObjectClass, jenv, $input); + mid = JCALL3(GetMethodID, jenv, clazz, "toByteArray", "()[B"); + ba = (jbyteArray)JCALL2(CallObjectMethod, jenv, $input, mid); + bae = JCALL2(GetByteArrayElements, jenv, ba, 0); + sz = JCALL1(GetArrayLength, jenv, ba); + $1 = &temp; + temp = 0; + if (bae[0] == 0) { + for(i=sz-1; i>0; i-- ) { + temp = (temp << 8) | (unsigned char)bae[sz-i]; + } + } + else { + for(i=sz; i>=0; i-- ) { + temp = (temp << 8) | (unsigned char)bae[sz-1-i]; + } + } + JCALL3(ReleaseByteArrayElements, jenv, ba, bae, 0); +} + +%typemap(out) const unsigned long long & { + jbyteArray ba = JCALL1(NewByteArray, jenv, 9); + jbyte* bae = JCALL2(GetByteArrayElements, jenv, ba, 0); + jclass clazz = JCALL1(FindClass, jenv, "java/math/BigInteger"); + jmethodID mid = JCALL3(GetMethodID, jenv, clazz, "", "([B)V"); + jobject bigint; + int i; + + bae[0] = 0; + for(i=1; i<9; i++ ) { + bae[i] = (jbyte)(*$1>>8*(8-i)); + } + + JCALL3(ReleaseByteArrayElements, jenv, ba, bae, 0); + bigint = JCALL3(NewObject, jenv, clazz, mid, ba); + $result = bigint; +} + +/* Default handling. Object passed by value. Convert to a pointer */ +%typemap(in) SWIGTYPE ($&1_type argp) +%{ argp = *($&1_ltype*)&$input; + $1 = *argp; %} +%typemap(out) SWIGTYPE +#ifdef __cplusplus +%{$&1_ltype $1ptr = new $1_ltype(($1_ltype &)$1); + *($&1_ltype*)&$result = $1ptr; %} +#else +{ + $&1_ltype $1ptr = ($&1_ltype) malloc(sizeof($1_ltype)); + memmove($1ptr, &$1, sizeof($1_type)); + *($&1_ltype*)&$result = $1ptr; +} +#endif + +/* Generic pointers and references */ +%typemap(in) SWIGTYPE *, SWIGTYPE (CLASS::*) %{ $1 = *($&1_ltype)&$input; %} +%typemap(in) SWIGTYPE & %{ $1 = *($&1_ltype)&$input; + if(!$1) { + //SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "$1_type reference is null"); + return $null; + } %} +%typemap(out) SWIGTYPE *, SWIGTYPE &, SWIGTYPE (CLASS::*) %{ *($&1_ltype)&$result = $1; %} + + +/* Default array handling */ +%typemap(in) SWIGTYPE [] %{ $1 = *($&1_ltype)&$input; %} +%typemap(out) SWIGTYPE [] %{ *($&1_ltype)&$result = $1; %} + +/* char[ANY] - treat as String */ +%typemap(in) char[ANY] { + $1 = $input; +} + +%typemap(argout) char[ANY] "" +%typemap(freearg) char[ANY] ""//{ if ($1) JCALL2(ReleaseStringUTFChars, jenv, $input, $1); } +%typemap(out) char[ANY] { if($1) $result = $1; } + +/* JNI types */ +%typemap(in) jboolean, + jchar, + jbyte, + jshort, + jint, + jlong, + jfloat, + jdouble, + jstring, + jobject, + jbooleanArray, + jcharArray, + jbyteArray, + jshortArray, + jintArray, + jlongArray, + jfloatArray, + jdoubleArray, + jobjectArray +%{ $1 = $input; %} + +%typemap(out) jboolean, + jchar, + jbyte, + jshort, + jint, + jlong, + jfloat, + jdouble, + jstring, + jobject, + jbooleanArray, + jcharArray, + jbyteArray, + jshortArray, + jintArray, + jlongArray, + jfloatArray, + jdoubleArray, + jobjectArray +%{ $result = $1; %} + + +/* Typecheck typemaps - The purpose of these is merely to issue a warning for overloaded C++ functions + * that cannot be overloaded in Java as more than one C++ type maps to a single Java type */ + +%typecheck(SWIG_TYPECHECK_BOOL) /* Java boolean */ + jboolean, + bool, + const bool & + "" + +%typecheck(SWIG_TYPECHECK_CHAR) /* Java char */ + jchar, + char, + const char & + "" + +%typecheck(SWIG_TYPECHECK_INT8) /* Java byte */ + jbyte, + signed char, + const signed char & + "" + +%typecheck(SWIG_TYPECHECK_INT16) /* Java short */ + jshort, + unsigned char, + short, + const unsigned char &, + const short & + "" + +%typecheck(SWIG_TYPECHECK_INT32) /* Java int */ + jint, + unsigned short, + int, + long, + const unsigned short &, + const int &, + const long &, + enum SWIGTYPE + "" + +%typecheck(SWIG_TYPECHECK_INT64) /* Java long */ + jlong, + unsigned int, + unsigned long, + long long, + const unsigned int &, + const unsigned long &, + const long long & + "" + +%typecheck(SWIG_TYPECHECK_INT128) /* Java BigInteger */ + unsigned long long + "" + +%typecheck(SWIG_TYPECHECK_FLOAT) /* Java float */ + jfloat, + float, + const float & + "" + +%typecheck(SWIG_TYPECHECK_DOUBLE) /* Java double */ + jdouble, + double, + const double & + "" + +%typecheck(SWIG_TYPECHECK_STRING) /* Java String */ + jstring, + char *, + char[ANY] + "" + +%typecheck(SWIG_TYPECHECK_BOOL_ARRAY) /* Java boolean[] */ + jbooleanArray + "" + +%typecheck(SWIG_TYPECHECK_CHAR_ARRAY) /* Java char[] */ + jcharArray + "" + +%typecheck(SWIG_TYPECHECK_INT8_ARRAY) /* Java byte[] */ + jbyteArray + "" + +%typecheck(SWIG_TYPECHECK_INT16_ARRAY) /* Java short[] */ + jshortArray + "" + +%typecheck(SWIG_TYPECHECK_INT32_ARRAY) /* Java int[] */ + jintArray + "" + +%typecheck(SWIG_TYPECHECK_INT64_ARRAY) /* Java long[] */ + jlongArray + "" + +%typecheck(SWIG_TYPECHECK_FLOAT_ARRAY) /* Java float[] */ + jfloatArray + "" + +%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY) /* Java double[] */ + jdoubleArray + "" + +%typecheck(SWIG_TYPECHECK_POINTER) /* Default */ + SWIGTYPE, + SWIGTYPE *, + SWIGTYPE &, + SWIGTYPE [], + SWIGTYPE (CLASS::*) + "" + + +/* Exception handling */ + +%typemap(throws) int, + long, + short, + unsigned int, + unsigned long, + unsigned short { + char error_msg[256]; + sprintf(error_msg, "C++ $1_type exception thrown, value: %d", $1); + SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, error_msg); + return $null; +} + +%typemap(throws) SWIGTYPE { + SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "C++ $1_type exception thrown"); + return $null; +} + +%typemap(throws) char * { + SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, $1); + return $null; +} + + +/* Typemaps for code generation in proxy classes and Java type wrapper classes */ + +/* The javain typemap is used for converting function parameter types from the type + * used in the proxy, module or type wrapper class to the type used in the JNI class. */ +%typemap(javain) bool, const bool &, + char, const char &, + signed char, const signed char &, + unsigned char, const unsigned char &, + short, const short &, + unsigned short, const unsigned short &, + int, const int &, + unsigned int, const unsigned int &, + long, const long &, + unsigned long, const unsigned long &, + long long, const long long &, + unsigned long long, const unsigned long long &, + float, const float &, + double, const double &, + char *, + char[ANY], + enum SWIGTYPE + "$javainput" +%typemap(javain) jboolean, + jchar, + jbyte, + jshort, + jint, + jlong, + jfloat, + jdouble, + jstring, + jobject, + jbooleanArray, + jcharArray, + jbyteArray, + jshortArray, + jintArray, + jlongArray, + jfloatArray, + jdoubleArray, + jobjectArray + "$javainput" +%typemap(javain) SWIGTYPE "$&javaclassname.getCPtr($javainput)" +%typemap(javain) SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) "$javaclassname.getCPtr($javainput)" + +/* The javaout typemap is used for converting function return types from the return type + * used in the JNI class to the type returned by the proxy, module or type wrapper class. */ +%typemap(javaout) bool, const bool &, + char, const char &, + signed char, const signed char &, + unsigned char, const unsigned char &, + short, const short &, + unsigned short, const unsigned short &, + int, const int &, + unsigned int, const unsigned int &, + long, const long &, + unsigned long, const unsigned long &, + long long, const long long &, + unsigned long long, const unsigned long long &, + float, const float &, + double, const double &, + char *, + char[ANY], + enum SWIGTYPE { + return $jnicall; + } +%typemap(javaout) jboolean, + jchar, + jbyte, + jshort, + jint, + jlong, + jfloat, + jdouble, + jstring, + jobject, + jbooleanArray, + jcharArray, + jbyteArray, + jshortArray, + jintArray, + jlongArray, + jfloatArray, + jdoubleArray, + jobjectArray { + return $jnicall; + } +%typemap(javaout) void { + $jnicall; + } +%typemap(javaout) SWIGTYPE { + return new $&javaclassname($jnicall, true); + } +%typemap(javaout) SWIGTYPE & { + return new $javaclassname($jnicall, $owner); + } +%typemap(javaout) SWIGTYPE *, SWIGTYPE [], SWIGTYPE (CLASS::*) { + IntPtr cPtr = $jnicall; + return (cPtr == IntPtr.Zero) ? null : new $javaclassname(cPtr, $owner); + } + +/* Typemaps used for the generation of proxy and type wrapper class code */ +%typemap(javabase) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) "" +%typemap(javaclassmodifiers) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) "public" +%typemap(javacode) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) "" +%typemap(javaimports) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) "using System;" +%typemap(javajniimports) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) "using System;\nusing System.Runtime.InteropServices;" +%typemap(javamoduleimports) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) "using System;" +%typemap(javainterfaces) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) "" +%typemap(javaptrconstructormodifiers) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) "internal" + +%typemap(cildispose) SWIGTYPE %{ + public virtual void Dispose() { + delete(); + } +%} + +%typemap(cildisposeoverride) SWIGTYPE %{ + public override void Dispose() { + delete(); + } +%} + +%typemap(javagetcptr) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) %{ + internal static IntPtr getCPtr($javaclassname obj) { + return (obj == null) ? IntPtr.Zero : obj.swigCPtr; + } +%} + +/* Java specific directives */ +#define %javaconst(flag) %feature("java:const","flag") +#define %javamethodmodifiers %feature("java:methodmodifiers") + +%javamethodmodifiers "public"; + + +/* Some ANSI C typemaps */ + +%apply long { size_t }; +