Cosmetic stray semi-colon removal after %typemap using quotes

This commit is contained in:
William S Fulton 2022-08-20 22:14:58 +01:00
commit c10a84c775
59 changed files with 258 additions and 256 deletions

View file

@ -5,8 +5,8 @@
%feature("autodoc");
// special typemap and its docs
%typemap(in) (int c, int d) "$1 = 0; $2 = 0;";
%typemap(doc,name="hello",type="Tuple") (int c, int d) "hello: int tuple[2]";
%typemap(in) (int c, int d) "$1 = 0; $2 = 0;"
%typemap(doc,name="hello",type="Tuple") (int c, int d) "hello: int tuple[2]"
// testing for different documentation levels
%feature("autodoc","0") A::func0; // names
@ -69,8 +69,8 @@
%typemap(doc) (int c, int d);
// docs for some parameters
%typemap(doc) int a "a: special comment for parameter a";
%typemap(doc) int b "b: another special comment for parameter b";
%typemap(doc) int a "a: special comment for parameter a"
%typemap(doc) int b "b: another special comment for parameter b"
%feature("autodoc","0") C::C(int a, int b, Hola h); // names
%feature("autodoc","1") D::D(int a, int b, Hola h); // names + types

View file

@ -144,7 +144,7 @@
%rename(renamed2arg) Foo::renameme(int x) const;
%rename(renamed1arg) Foo::renameme() const;
%typemap(default) double* null_by_default "$1=0;";
%typemap(default) double* null_by_default "$1=0;"
%inline %{
typedef void* MyHandle;

View file

@ -21,7 +21,7 @@ int bar(int a)
}
%}
%typemap(in,fragment="Hi") int hola "$1 = 123;";
%typemap(in,fragment="Hi") int hola "$1 = 123;"
%inline %{

View file

@ -161,8 +161,8 @@ void *string_to_uintptr(char *in)
// These typemaps convert between an array of strings in Go and a
// const char** that is NULL terminated in C++.
%typemap(gotype) (const char * const *) "[]string";
%typemap(imtype) (const char * const *) "uintptr";
%typemap(gotype) (const char * const *) "[]string"
%typemap(imtype) (const char * const *) "uintptr"
%typemap(goin) (const char * const *) {
if $input == nil || len($input) == 0 {
$result = 0

View file

@ -2,11 +2,11 @@
%module ignore_parameter
%typemap(in,numinputs=0) char* a "static const char* hi = \"hello\"; $1 = const_cast<char *>(hi);";
%typemap(in,numinputs=0) int bb "$1 = 101; called_argout = 0;";
%typemap(in,numinputs=0) double ccc "$1 = 8.8;";
%typemap(in,numinputs=0) char* a "static const char* hi = \"hello\"; $1 = const_cast<char *>(hi);"
%typemap(in,numinputs=0) int bb "$1 = 101; called_argout = 0;"
%typemap(in,numinputs=0) double ccc "$1 = 8.8;"
%typemap(freearg) char* a ""; // ensure freearg is not generated (needed for Java at least)
%typemap(freearg) char* a "" // ensure freearg is not generated (needed for Java at least)
%typemap(argout) int bb "called_argout = 1;"

View file

@ -139,7 +139,7 @@
%rename(MyJavaException2) MyNS::Exception2;
%rename(MyJavaUnexpected) MyNS::Unexpected;
%typemap(javabase) ::MyNS::Exception1,::MyNS::Exception2,::MyNS::Unexpected "java.lang.Exception";
%typemap(javabase) ::MyNS::Exception1,::MyNS::Exception2,::MyNS::Unexpected "java.lang.Exception"
%rename(getMessage) what() const; // Rename all what() methods
namespace MyNS {

View file

@ -146,7 +146,7 @@
%rename(MyJavaException2) MyNS::Exception2;
%rename(MyJavaUnexpected) MyNS::Unexpected;
%typemap(javabase) ::MyNS::Exception1,::MyNS::Exception2,::MyNS::Unexpected "java.lang.Exception";
%typemap(javabase) ::MyNS::Exception1,::MyNS::Exception2,::MyNS::Unexpected "java.lang.Exception"
%rename(getMessage) what() const; // Rename all what() methods
namespace MyNS {

View file

@ -88,7 +88,7 @@ int ioTest() { return 0; }
%}
// except feature (%javaexception) specifying a checked exception class for the throws clause
%typemap(javabase) MyException "Throwable";
%typemap(javabase) MyException "Throwable"
%typemap(javacode) MyException %{
public static final long serialVersionUID = 0x52151000; // Suppress ecj warning
%}

View file

@ -3,21 +3,21 @@
%module java_typemaps_proxy
%typemap(javaimports) SWIGTYPE "import java.math.*;";
%typemap(javaimports) SWIGTYPE "import java.math.*;"
%typemap(javacode) NS::Farewell %{
public void saybye(BigDecimal num_times) {
// BigDecimal requires the java.math library
}
%}
%typemap(javaclassmodifiers) NS::Farewell "public final class";
%typemap(javaclassmodifiers) NS::Farewell "public final class"
%typemap(javaimports) NS::Greeting %{
import java.util.*; // for EventListener
import java.lang.*; // for Exception
%};
%typemap(javabase) NS::Greeting "Exception";
%typemap(javainterfaces) NS::Greeting "EventListener";
%typemap(javabase) NS::Greeting "Exception"
%typemap(javainterfaces) NS::Greeting "EventListener"
%typemap(javacode) NS::Greeting %{
public static final long serialVersionUID = 0x52151000; // Suppress ecj warning
// Pure Java code generated using %typemap(javacode)
@ -60,7 +60,7 @@ import java.lang.*; // for Exception
%}
// get rid of the finalize method for NS::Farewell
%typemap(javafinalize) NS::Farewell "";
%typemap(javafinalize) NS::Farewell ""
// Test typemaps are being found for templated classes
%typemap(javacode) NS::Adieu<int**> %{
@ -89,7 +89,7 @@ namespace NS {
%template(AdieuIntPtrPtr) NS::Adieu<int**>;
// Check the premature garbage collection prevention parameter can be turned off
%typemap(jtype, nopgcpp="1") Without * "long";
%typemap(jtype, nopgcpp="1") Without * "long"
%pragma(java) jniclassclassmodifiers="public class"
%inline %{
@ -109,7 +109,7 @@ struct With {
void global_method_with(With *p) {}
%}
%typemap(jtype, nopgcpp="1") const ConstWithout * "long";
%typemap(jtype, nopgcpp="1") const ConstWithout * "long"
%inline %{
class ConstWithout {
public:

View file

@ -3,7 +3,7 @@
%module java_typemaps_typewrapper
%typemap(javaimports) SWIGTYPE * "import java.math.*;";
%typemap(javaimports) SWIGTYPE * "import java.math.*;"
%typemap(javacode) Farewell * %{
public static $javaclassname CreateNullPointer() {
return new $javaclassname();
@ -12,15 +12,15 @@
// BigDecimal requires the java.math library
}
%}
%typemap(javaclassmodifiers) Farewell * "public final class";
%typemap(javaclassmodifiers) Farewell * "public final class"
%typemap(javaimports) Greeting * %{
import java.util.*; // for EventListener
import java.lang.*; // for Exception
%};
%typemap(javabase) Greeting * "Exception";
%typemap(javainterfaces) Greeting * "EventListener";
%typemap(javabase) Greeting * "Exception"
%typemap(javainterfaces) Greeting * "EventListener"
%typemap(javacode) Greeting * %{
public static final long serialVersionUID = 0x52151000; // Suppress ecj warning
// Pure Java code generated using %typemap(javacode)

View file

@ -40,18 +40,18 @@ $importtype(IRemoteAsyncIO)
#endif
// Modify multiple inherited base classes into inheriting interfaces
%typemap(javainterfaces) RemoteMpe "IRemoteSyncIO, IRemoteAsyncIO";
%typemap(javabase, replace="1") RemoteMpe "";
%typemap(javainterfaces) RemoteMpe "IRemoteSyncIO, IRemoteAsyncIO"
%typemap(javabase, replace="1") RemoteMpe ""
// Turn the proxy class into an interface
%typemap(javaclassmodifiers) IRemoteSyncIO "public interface";
%typemap(javaclassmodifiers) IRemoteAsyncIO "public interface";
%typemap(javabody) IRemoteSyncIO "";
%typemap(javabody) IRemoteAsyncIO "";
%typemap(javafinalize) IRemoteSyncIO "";
%typemap(javafinalize) IRemoteAsyncIO "";
%typemap(javadestruct) IRemoteSyncIO "";
%typemap(javadestruct) IRemoteAsyncIO "";
%typemap(javaclassmodifiers) IRemoteSyncIO "public interface"
%typemap(javaclassmodifiers) IRemoteAsyncIO "public interface"
%typemap(javabody) IRemoteSyncIO ""
%typemap(javabody) IRemoteAsyncIO ""
%typemap(javafinalize) IRemoteSyncIO ""
%typemap(javafinalize) IRemoteAsyncIO ""
%typemap(javadestruct) IRemoteSyncIO ""
%typemap(javadestruct) IRemoteAsyncIO ""
// Turn the methods into abstract methods
%typemap(javaout) void IRemoteSyncIO::syncmethod ";"

View file

@ -5,7 +5,7 @@
#include <stdlib.h>
%}
%typemap(default) double y "$1=1000;";
%typemap(default) double y "$1=1000;"
#endif
#ifdef SWIGLUA

View file

@ -1,6 +1,6 @@
%module overload_extend2
%typemap(default) int int2 "$1=1000;";
%typemap(default) int int2 "$1=1000;"
%inline %{
typedef struct Foo {

View file

@ -1,7 +1,7 @@
/* php_iterator.i - PHP-specific testcase for wrapping to a PHP Iterator */
%module php_iterator
%typemap("phpinterfaces") MyIterator "Iterator";
%typemap("phpinterfaces") MyIterator "Iterator"
%inline %{

View file

@ -8,8 +8,8 @@
%feature("autodoc","0") A::func0static; // names
%feature("autodoc","1") A::func1static; // names + types
// special typemap and its docs
%typemap(in) (int c, int d) "$1 = 0; $2 = 0;";
%typemap(doc,name="hello",type="Tuple") (int c, int d) "hello: int tuple[2]";
%typemap(in) (int c, int d) "$1 = 0; $2 = 0;"
%typemap(doc,name="hello",type="Tuple") (int c, int d) "hello: int tuple[2]"
%extend A {
static int staticextended(int i) { return i; }

View file

@ -1,7 +1,7 @@
%module ruby_manual_proxy
%typemap(in, numinputs=0) SWIGTYPE ** ($*1_ltype temp) "$1 = &temp;";
%typemap(in, numinputs=0) SWIGTYPE ** ($*1_ltype temp) "$1 = &temp;"
%typemap(argout) SWIGTYPE **OUTPARAM {
$result = SWIG_Ruby_AppendOutput($result, SWIG_NewPointerObj(*$1, $*1_descriptor, 0));

View file

@ -11,9 +11,9 @@ template<class T, class U> class map {
};
%}
//%typemap(in) vector<int> "$target = new vector<int>();";
//%typemap(in) vector<unsigned int> "$target = new vector<unsigned int>();";
//%typemap(in) map<int,int> "$target = new map<int, int>();";
//%typemap(in) vector<int> "$target = new vector<int>();"
//%typemap(in) vector<unsigned int> "$target = new vector<unsigned int>();"
//%typemap(in) map<int,int> "$target = new map<int, int>();"
%inline %{
void foo(vector<int > v) {}

View file

@ -68,12 +68,12 @@
%clear int Space::nspace;
%clear int Space::Struct::smember;
%ignore Space::Struct::member;
%typemap(varin) int globul "TYPEMAP_VARIABLES_FAIL";
%typemap(varout, noblock=1, fragment=SWIG_From_frag(int)) int globul "if (!SWIG_IsOK(SWIG_Scilab_SetOutput(pvApiCtx, SWIG_From_int($result)))) return SWIG_ERROR;";
%typemap(varin) int Space::nspace "TYPEMAP_VARIABLES_FAIL";
%typemap(varout, noblock=1, fragment=SWIG_From_frag(int)) int Space::nspace "if (!SWIG_IsOK(SWIG_Scilab_SetOutput(pvApiCtx, SWIG_From_int($result)))) return SWIG_ERROR;";
%typemap(varin) int Space::Struct::smember "TYPEMAP_VARIABLES_FAIL";
%typemap(varout, noblock=1, fragment=SWIG_From_frag(int)) int Space::Struct::smember "if (!SWIG_IsOK(SWIG_Scilab_SetOutput(pvApiCtx, SWIG_From_int($result)))) return SWIG_ERROR;";
%typemap(varin) int globul "TYPEMAP_VARIABLES_FAIL"
%typemap(varout, noblock=1, fragment=SWIG_From_frag(int)) int globul "if (!SWIG_IsOK(SWIG_Scilab_SetOutput(pvApiCtx, SWIG_From_int($result)))) return SWIG_ERROR;"
%typemap(varin) int Space::nspace "TYPEMAP_VARIABLES_FAIL"
%typemap(varout, noblock=1, fragment=SWIG_From_frag(int)) int Space::nspace "if (!SWIG_IsOK(SWIG_Scilab_SetOutput(pvApiCtx, SWIG_From_int($result)))) return SWIG_ERROR;"
%typemap(varin) int Space::Struct::smember "TYPEMAP_VARIABLES_FAIL"
%typemap(varout, noblock=1, fragment=SWIG_From_frag(int)) int Space::Struct::smember "if (!SWIG_IsOK(SWIG_Scilab_SetOutput(pvApiCtx, SWIG_From_int($result)))) return SWIG_ERROR;"
#endif
%inline %{