mirror of https://github.com/swig/swig
Cosmetic stray semi-colon removal after %typemap using quotes
This commit is contained in:
parent
ec965840ce
commit
c10a84c775
40
CHANGES
40
CHANGES
|
@ -3137,7 +3137,7 @@ Version 3.0.3 (30 Dec 2014)
|
|||
|
||||
2014-09-12: olly
|
||||
[PHP] Add support for specifying any PHP interfaces a wrapped class
|
||||
implements, e.g.: %typemap("phpinterfaces") MyIterator "Iterator";
|
||||
implements, e.g.: %typemap("phpinterfaces") MyIterator "Iterator"
|
||||
|
||||
2014-09-11: olly
|
||||
[PHP] Fix throwing a PHP exception through C++ from a subclassed
|
||||
|
@ -8396,8 +8396,8 @@ Version 1.3.30 (November 13, 2006)
|
|||
javabase/csbase typemap, eg in the following, 'Me' will be the base class,
|
||||
no matter what Foo is really derived from in the C++ layer.
|
||||
|
||||
%typemap(javabase, replace="1") Foo "Me";
|
||||
%typemap(csbase, replace="1") Foo "Me";
|
||||
%typemap(javabase, replace="1") Foo "Me"
|
||||
%typemap(csbase, replace="1") Foo "Me"
|
||||
|
||||
Previously it was not possible for the javabase/csbase typemaps to override the C++ base.
|
||||
|
||||
|
@ -9884,7 +9884,7 @@ Version 1.3.28 (February 12, 2006)
|
|||
solutions is to write:
|
||||
|
||||
%typemap(in) A * {...}
|
||||
%typemap(freeag) A * "";
|
||||
%typemap(freeag) A * ""
|
||||
|
||||
overload 'freearg' with an empty definition.
|
||||
|
||||
|
@ -11314,20 +11314,20 @@ Version 1.3.27 (October 15, 2005)
|
|||
then the typemap will be inserted without the block
|
||||
imposed by the brackets, similar to
|
||||
|
||||
%typemap(in) Hello "...";
|
||||
%typemap(in) Hello "..."
|
||||
|
||||
So, why you don't just use the quote style?, because:
|
||||
|
||||
1.- The quote style doesn't get preprocessed, for example
|
||||
|
||||
%typemap(in) Hello "$1= SWIG_macro($1);";
|
||||
%typemap(in) Hello "$1= SWIG_macro($1);"
|
||||
|
||||
here, SWIG_macro doesn't get expanded
|
||||
|
||||
2.- Inside a quote typemap, you have to use
|
||||
quotes carefully
|
||||
|
||||
%typemap(in) Hello "$1 = \"hello\" ";
|
||||
%typemap(in) Hello "$1 = \"hello\" "
|
||||
|
||||
3.- You can't make emacs and/or other editors
|
||||
to indent inside a string!.
|
||||
|
@ -11529,7 +11529,7 @@ Version 1.3.26 (October 9, 2005)
|
|||
|
||||
%define hello(name, Type)
|
||||
%define name ## a(Type)
|
||||
%typemap(in) Type "hello;";
|
||||
%typemap(in) Type "hello;"
|
||||
%enddef
|
||||
%enddef
|
||||
|
||||
|
@ -13525,7 +13525,7 @@ Version 1.3.23 (November 11, 2004)
|
|||
whereupon the default of 0 was used. You can get the same behaviour for C
|
||||
code by using the "default" typemap:
|
||||
|
||||
%typemap(default) int val "$1 = 0;";
|
||||
%typemap(default) int val "$1 = 0;"
|
||||
%{
|
||||
void foo(int val);
|
||||
%}
|
||||
|
@ -13854,9 +13854,11 @@ Version 1.3.22 (September 4, 2004)
|
|||
specifiers from the C type. This makes it possible, for instance, to control
|
||||
whether a C "char" argument takes a Lisp character or a Lisp integer value.
|
||||
The default (taking Lisp characters) is done by these built-in typemaps:
|
||||
%typemap(ffitype) char ":char"; %typemap(lisptype) char "character";
|
||||
%typemap(ffitype) char ":char"
|
||||
%typemap(lisptype) char "character"
|
||||
If char means an integer instead, use these typemaps:
|
||||
%typemap(ffitype) char ":char"; %typemap(lisptype) char "integer";
|
||||
%typemap(ffitype) char ":char"
|
||||
%typemap(lisptype) char "integer"
|
||||
|
||||
08/22/2004: wsfulton
|
||||
As discussed in bug #772453, the SWIG library directory is now installed
|
||||
|
@ -18874,9 +18876,9 @@ Version 1.3.14 (August 12, 2002)
|
|||
shadowinterface
|
||||
|
||||
Note that it is possible to target a particular proxy class:
|
||||
%typemap(javaimports) Foo "import java.util.*";
|
||||
%typemap(javaimports) Foo "import java.util.*"
|
||||
or a particular type wrapper class:
|
||||
%typemap(javaimports) double* "import java.math.*";
|
||||
%typemap(javaimports) double* "import java.math.*"
|
||||
Note that $javaclassname in these typemaps are substituted with either the proxy
|
||||
classname when using proxy classes or the SWIGTYPE class name.
|
||||
|
||||
|
@ -21071,7 +21073,7 @@ Version 1.3.11 (January 31, 2002)
|
|||
|
||||
Second, a typemap can force a no-match by defining
|
||||
|
||||
%typemap(in) sometype "pass";
|
||||
%typemap(in) sometype "pass"
|
||||
|
||||
If this is used, the typemap system will *not* record a
|
||||
typemap match for "sometype". This can be used to block
|
||||
|
@ -21079,7 +21081,7 @@ Version 1.3.11 (January 31, 2002)
|
|||
a typemap feature for some type, you could do this.
|
||||
|
||||
// Do not allow global variables of type 'const char *' to be set.
|
||||
%typemap(varin) const char * "pass";
|
||||
%typemap(varin) const char * "pass"
|
||||
|
||||
It might also be possible to use this to do subtle and
|
||||
strange things with typemaps. For example, if you wanted to
|
||||
|
@ -21093,8 +21095,8 @@ Version 1.3.11 (January 31, 2002)
|
|||
... return a value ...
|
||||
}
|
||||
/* Block unqualified typemaps defined above */
|
||||
%typemap(ignore) const blah * "pass";
|
||||
%typemap(argout) const blah * "pass";
|
||||
%typemap(ignore) const blah * "pass"
|
||||
%typemap(argout) const blah * "pass"
|
||||
%typemap(in) const blah * {
|
||||
... get input value ...
|
||||
}
|
||||
|
@ -21871,7 +21873,7 @@ Version 1.3.10 (December 10, 2001)
|
|||
%typemap directive can now accept nearly arbitrary keyword parameters.
|
||||
For example:
|
||||
|
||||
%typemap(in,parse="i",doc="integer") int "...";
|
||||
%typemap(in,parse="i",doc="integer") int "..."
|
||||
|
||||
The purpose of the keyword parameters is to supply code generation
|
||||
hints to the target language module. The intepretation of the
|
||||
|
@ -23949,7 +23951,7 @@ Version 1.3 Alpha 4 (September 4, 2000)
|
|||
Typemaps can now be specified using string literals like
|
||||
this:
|
||||
|
||||
%typemap(in) int "$target = SvIV($source);";
|
||||
%typemap(in) int "$target = SvIV($source);"
|
||||
|
||||
When code is specified like this, it is *NOT* enclosed
|
||||
inside a local scope (as with older typemap declarations).
|
||||
|
|
|
@ -668,7 +668,7 @@ results. For example:
|
|||
|
||||
<div class="code">
|
||||
<pre>
|
||||
%typemap(newfree) char * "free($1);";
|
||||
%typemap(newfree) char * "free($1);"
|
||||
...
|
||||
%newobject strdup;
|
||||
...
|
||||
|
|
|
@ -278,7 +278,7 @@ Like, $imcall, this special variable is only expanded in the "dout" typemap.
|
|||
<p>This macro is used in the <tt>dimports</tt> typemap if a dependency on another D type generated by SWIG is added by a custom typemap.</p>
|
||||
<p>Consider the following code snippet:</p>
|
||||
<div class="code"><pre>
|
||||
%typemap(dinterfaces) SomeClass "AnInterface, AnotherInterface";
|
||||
%typemap(dinterfaces) SomeClass "AnInterface, AnotherInterface"
|
||||
</pre></div>
|
||||
<p>This causes SWIG to add <tt>AnInterface</tt> and <tt>AnotherInterface</tt> to the base class list of <tt>SomeClass</tt>:</p>
|
||||
<div class="targetlang"><pre>
|
||||
|
|
|
@ -1114,7 +1114,7 @@ name of the type with namespace scope delimiters (<tt>::</tt>) replaced with a d
|
|||
change this, you can define your own typemaps for the custom types, e.g:
|
||||
</p>
|
||||
<div class="code"><pre>
|
||||
%typemap(doctype) MyDate "datetime.date";
|
||||
%typemap(doctype) MyDate "datetime.date"
|
||||
</pre></div>
|
||||
|
||||
<p>
|
||||
|
|
|
@ -4218,7 +4218,7 @@ You can copy the code below into an interface file and run SWIG on it and examin
|
|||
%}
|
||||
|
||||
// Expose C++ exception as a Java Exception by changing the Java base class and providing a getMessage()
|
||||
%typemap(javabase) MyNS::MyException "java.lang.RuntimeException";
|
||||
%typemap(javabase) MyNS::MyException "java.lang.RuntimeException"
|
||||
%rename(getMessage) MyNS::MyException::whatsup;
|
||||
|
||||
%inline %{
|
||||
|
@ -7065,7 +7065,7 @@ The corrected interface file looks like:
|
|||
<pre>
|
||||
// class Foo is handled in a different interface file:
|
||||
%import "Foo.i"
|
||||
%typemap("javapackage") Foo, Foo *, Foo & "com.wombat.foo";
|
||||
%typemap("javapackage") Foo, Foo *, Foo & "com.wombat.foo"
|
||||
%feature("director") Example;
|
||||
|
||||
%inline {
|
||||
|
@ -7093,11 +7093,11 @@ Note the helper macros below, <code>OTHER_PACKAGE_SPEC</code> and <code>ANOTHER_
|
|||
"package.for.most.classes";
|
||||
|
||||
%define OTHER_PACKAGE_SPEC(TYPE...)
|
||||
%typemap("javapackage") TYPE, TYPE *, TYPE & "package.for.other.classes";
|
||||
%typemap("javapackage") TYPE, TYPE *, TYPE & "package.for.other.classes"
|
||||
%enddef
|
||||
|
||||
%define ANOTHER_PACKAGE_SPEC(TYPE...)
|
||||
%typemap("javapackage") TYPE, TYPE *, TYPE & "package.for.another.set";
|
||||
%typemap("javapackage") TYPE, TYPE *, TYPE & "package.for.another.set"
|
||||
%enddef
|
||||
|
||||
OTHER_PACKAGE_SPEC(Package_2_class_one)
|
||||
|
@ -7291,7 +7291,7 @@ The typemaps to use then are as follows:
|
|||
|
||||
<div class="code">
|
||||
<pre>
|
||||
%typemap(javabase) FileException "java.lang.Exception";
|
||||
%typemap(javabase) FileException "java.lang.Exception"
|
||||
%typemap(javacode) FileException %{
|
||||
public String getMessage() {
|
||||
return what();
|
||||
|
|
|
@ -264,7 +264,7 @@ Let's edit the interface file such that the C type "div_t*" is changed
|
|||
<div class="code"><pre>
|
||||
%module test
|
||||
|
||||
%typemap(cin) div_t* ":my-pointer";
|
||||
%typemap(cin) div_t* ":my-pointer"
|
||||
|
||||
%feature("intern_function", "1");
|
||||
%feature("export");
|
||||
|
|
|
@ -836,7 +836,7 @@ so:
|
|||
</p>
|
||||
|
||||
<div class="code"><pre>
|
||||
%typemap("phpinterfaces") MyIterator "Iterator";
|
||||
%typemap("phpinterfaces") MyIterator "Iterator"
|
||||
</pre></div>
|
||||
|
||||
<p>
|
||||
|
|
|
@ -1707,7 +1707,7 @@ For example: </p>
|
|||
<div class="code">
|
||||
<pre>%rename("is_it_safe?") is_it_safe();
|
||||
|
||||
%typemap(out) int is_it_safe "$result = ($1 != 0) ? Qtrue : Qfalse;";
|
||||
%typemap(out) int is_it_safe "$result = ($1 != 0) ? Qtrue : Qfalse;"
|
||||
|
||||
int is_it_safe();</pre>
|
||||
</div>
|
||||
|
|
|
@ -787,7 +787,7 @@ Here are some examples of valid typemap specifications:
|
|||
%typemap(in) int {
|
||||
$1 = PyInt_AsLong($input);
|
||||
}
|
||||
%typemap(in) int "$1 = PyInt_AsLong($input);";
|
||||
%typemap(in) int "$1 = PyInt_AsLong($input);"
|
||||
%typemap(in) int %{
|
||||
$1 = PyInt_AsLong($input);
|
||||
%}
|
||||
|
@ -803,7 +803,7 @@ Here are some examples of valid typemap specifications:
|
|||
}
|
||||
|
||||
/* Typemap with modifiers */
|
||||
%typemap(in, doc="integer") int "$1 = scm_to_int($input);";
|
||||
%typemap(in, doc="integer") int "$1 = scm_to_int($input);"
|
||||
|
||||
/* Typemap applied to patterns of multiple arguments */
|
||||
%typemap(in) (char *str, int len),
|
||||
|
@ -1356,13 +1356,13 @@ const reference are written like this:
|
|||
|
||||
<div class="code">
|
||||
<pre>
|
||||
%typemap(in) int "... convert to int ...";
|
||||
%typemap(in) short "... convert to short ...";
|
||||
%typemap(in) float "... convert to float ...";
|
||||
%typemap(in) int "... convert to int ..."
|
||||
%typemap(in) short "... convert to short ..."
|
||||
%typemap(in) float "... convert to float ..."
|
||||
...
|
||||
%typemap(in) const int & "... convert ...";
|
||||
%typemap(in) const short & "... convert ...";
|
||||
%typemap(in) const float & "... convert ...";
|
||||
%typemap(in) const int & "... convert ..."
|
||||
%typemap(in) const short & "... convert ..."
|
||||
%typemap(in) const float & "... convert ..."
|
||||
...
|
||||
</pre>
|
||||
</div>
|
||||
|
@ -1943,7 +1943,7 @@ Occasionally, typemap code will be specified using a few alternative forms. For
|
|||
|
||||
<div class="code">
|
||||
<pre>
|
||||
%typemap(in) int "$1 = PyInt_AsLong($input);";
|
||||
%typemap(in) int "$1 = PyInt_AsLong($input);"
|
||||
%typemap(in) int %{
|
||||
$1 = PyInt_AsLong($input);
|
||||
%}
|
||||
|
|
|
@ -42,8 +42,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
|
||||
|
|
|
@ -15,7 +15,7 @@ extern int squareCubed (int n, int *OUTPUT);
|
|||
|
||||
extern int gcd(int x, int y);
|
||||
|
||||
%typemap(arginit) (int argc, char *argv[]) "$2 = 0;";
|
||||
%typemap(arginit) (int argc, char *argv[]) "$2 = 0;"
|
||||
|
||||
%typemap(in) (int argc, char *argv[]) {
|
||||
AV *tempav;
|
||||
|
|
|
@ -14,7 +14,7 @@ extern int squareCubed (int n, int *OUTPUT);
|
|||
|
||||
extern int gcd(int x, int y);
|
||||
|
||||
%typemap(arginit) (int argc, char *argv[]) "$2 = 0;";
|
||||
%typemap(arginit) (int argc, char *argv[]) "$2 = 0;"
|
||||
|
||||
%typemap(in) (int argc, char *argv[]) {
|
||||
Tcl_Obj **listobjv = 0;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 %{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;"
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
%}
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 ";"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <stdlib.h>
|
||||
%}
|
||||
|
||||
%typemap(default) double y "$1=1000;";
|
||||
%typemap(default) double y "$1=1000;"
|
||||
#endif
|
||||
|
||||
#ifdef SWIGLUA
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
%module overload_extend2
|
||||
|
||||
%typemap(default) int int2 "$1=1000;";
|
||||
%typemap(default) int int2 "$1=1000;"
|
||||
|
||||
%inline %{
|
||||
typedef struct Foo {
|
||||
|
|
|
@ -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 %{
|
||||
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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) {}
|
||||
|
|
|
@ -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 %{
|
||||
|
|
|
@ -5,62 +5,62 @@
|
|||
|
||||
/* Typespecs for basic types. */
|
||||
|
||||
%typemap(cin) void ":void";
|
||||
%typemap(cin) void ":void"
|
||||
|
||||
%typemap(cin) char ":char";
|
||||
%typemap(cin) char * ":string";
|
||||
%typemap(cin) unsigned char ":unsigned-char";
|
||||
%typemap(cin) signed char ":char";
|
||||
%typemap(cin) char ":char"
|
||||
%typemap(cin) char * ":string"
|
||||
%typemap(cin) unsigned char ":unsigned-char"
|
||||
%typemap(cin) signed char ":char"
|
||||
|
||||
%typemap(cin) short ":short";
|
||||
%typemap(cin) signed short ":short";
|
||||
%typemap(cin) unsigned short ":unsigned-short";
|
||||
%typemap(cin) short ":short"
|
||||
%typemap(cin) signed short ":short"
|
||||
%typemap(cin) unsigned short ":unsigned-short"
|
||||
|
||||
%typemap(cin) int ":int";
|
||||
%typemap(cin) signed int ":int";
|
||||
%typemap(cin) unsigned int ":unsigned-int";
|
||||
%typemap(cin) int ":int"
|
||||
%typemap(cin) signed int ":int"
|
||||
%typemap(cin) unsigned int ":unsigned-int"
|
||||
|
||||
%typemap(cin) long ":long";
|
||||
%typemap(cin) signed long ":long";
|
||||
%typemap(cin) unsigned long ":unsigned-long";
|
||||
%typemap(cin) long ":long"
|
||||
%typemap(cin) signed long ":long"
|
||||
%typemap(cin) unsigned long ":unsigned-long"
|
||||
|
||||
%typemap(cin) long long ":long-long";
|
||||
%typemap(cin) signed long long ":long-long";
|
||||
%typemap(cin) unsigned long long ":unsigned-long-long";
|
||||
%typemap(cin) long long ":long-long"
|
||||
%typemap(cin) signed long long ":long-long"
|
||||
%typemap(cin) unsigned long long ":unsigned-long-long"
|
||||
|
||||
%typemap(cin) float ":float";
|
||||
%typemap(cin) double ":double";
|
||||
%typemap(cin) SWIGTYPE ":pointer";
|
||||
%typemap(cin) float ":float"
|
||||
%typemap(cin) double ":double"
|
||||
%typemap(cin) SWIGTYPE ":pointer"
|
||||
|
||||
%typemap(cout) void ":void";
|
||||
%typemap(cout) void ":void"
|
||||
|
||||
%typemap(cout) char ":char";
|
||||
%typemap(cout) char * ":string";
|
||||
%typemap(cout) unsigned char ":unsigned-char";
|
||||
%typemap(cout) signed char ":char";
|
||||
%typemap(cout) char ":char"
|
||||
%typemap(cout) char * ":string"
|
||||
%typemap(cout) unsigned char ":unsigned-char"
|
||||
%typemap(cout) signed char ":char"
|
||||
|
||||
%typemap(cout) short ":short";
|
||||
%typemap(cout) signed short ":short";
|
||||
%typemap(cout) unsigned short ":unsigned-short";
|
||||
%typemap(cout) short ":short"
|
||||
%typemap(cout) signed short ":short"
|
||||
%typemap(cout) unsigned short ":unsigned-short"
|
||||
|
||||
%typemap(cout) int ":int";
|
||||
%typemap(cout) signed int ":int";
|
||||
%typemap(cout) unsigned int ":unsigned-int";
|
||||
%typemap(cout) int ":int"
|
||||
%typemap(cout) signed int ":int"
|
||||
%typemap(cout) unsigned int ":unsigned-int"
|
||||
|
||||
%typemap(cout) long ":long";
|
||||
%typemap(cout) signed long ":long";
|
||||
%typemap(cout) unsigned long ":unsigned-long";
|
||||
%typemap(cout) long ":long"
|
||||
%typemap(cout) signed long ":long"
|
||||
%typemap(cout) unsigned long ":unsigned-long"
|
||||
|
||||
%typemap(cout) long long ":long-long";
|
||||
%typemap(cout) signed long long ":long-long";
|
||||
%typemap(cout) unsigned long long ":unsigned-long-long";
|
||||
%typemap(cout) long long ":long-long"
|
||||
%typemap(cout) signed long long ":long-long"
|
||||
%typemap(cout) unsigned long long ":unsigned-long-long"
|
||||
|
||||
%typemap(cout) float ":float";
|
||||
%typemap(cout) double ":double";
|
||||
%typemap(cout) SWIGTYPE ":pointer";
|
||||
%typemap(cout) float ":float"
|
||||
%typemap(cout) double ":double"
|
||||
%typemap(cout) SWIGTYPE ":pointer"
|
||||
|
||||
|
||||
%typemap(ctype) bool "int";
|
||||
%typemap(ctype) bool "int"
|
||||
%typemap(ctype) char, unsigned char, signed char,
|
||||
short, signed short, unsigned short,
|
||||
int, signed int, unsigned int,
|
||||
|
@ -68,9 +68,9 @@
|
|||
float, double, long double, char *, void *, void,
|
||||
enum SWIGTYPE, SWIGTYPE *,
|
||||
SWIGTYPE[ANY], SWIGTYPE &, SWIGTYPE && "$1_ltype";
|
||||
%typemap(ctype) SWIGTYPE "$&1_type";
|
||||
%typemap(ctype) SWIGTYPE "$&1_type"
|
||||
|
||||
%typemap(in) bool "$1 = (bool)$input;";
|
||||
%typemap(in) bool "$1 = (bool)$input;"
|
||||
%typemap(in) char, unsigned char, signed char,
|
||||
short, signed short, unsigned short,
|
||||
int, signed int, unsigned int,
|
||||
|
@ -78,10 +78,10 @@
|
|||
float, double, long double, char *, void *, void,
|
||||
enum SWIGTYPE, SWIGTYPE *,
|
||||
SWIGTYPE[ANY], SWIGTYPE &, SWIGTYPE && "$1 = $input;";
|
||||
%typemap(in) SWIGTYPE "$1 = *$input;";
|
||||
%typemap(in) SWIGTYPE "$1 = *$input;"
|
||||
|
||||
%typemap(out) void "";
|
||||
%typemap(out) bool "$result = (int)$1;";
|
||||
%typemap(out) void ""
|
||||
%typemap(out) bool "$result = (int)$1;"
|
||||
%typemap(out) char, unsigned char, signed char,
|
||||
short, signed short, unsigned short,
|
||||
int, signed int, unsigned int,
|
||||
|
@ -114,22 +114,22 @@
|
|||
SWIGTYPE[ANY], SWIGTYPE { $1 = 1; };
|
||||
/* This maps C/C++ types to Lisp classes for overload dispatch */
|
||||
|
||||
%typemap(lisptype) bool "cl:boolean";
|
||||
%typemap(lisptype) char "cl:character";
|
||||
%typemap(lisptype) unsigned char "cl:integer";
|
||||
%typemap(lisptype) signed char "cl:integer";
|
||||
%typemap(lisptype) bool "cl:boolean"
|
||||
%typemap(lisptype) char "cl:character"
|
||||
%typemap(lisptype) unsigned char "cl:integer"
|
||||
%typemap(lisptype) signed char "cl:integer"
|
||||
|
||||
%typemap(lispclass) bool "t";
|
||||
%typemap(lispclass) char "cl:character";
|
||||
%typemap(lispclass) bool "t"
|
||||
%typemap(lispclass) char "cl:character"
|
||||
%typemap(lispclass) unsigned char, signed char,
|
||||
short, signed short, unsigned short,
|
||||
int, signed int, unsigned int,
|
||||
long, signed long, unsigned long,
|
||||
enum SWIGTYPE "cl:integer";
|
||||
/* CLOS methods can't be specialized on single-float or double-float */
|
||||
%typemap(lispclass) float "cl:number";
|
||||
%typemap(lispclass) double "cl:number";
|
||||
%typemap(lispclass) char * "cl:string";
|
||||
%typemap(lispclass) float "cl:number"
|
||||
%typemap(lispclass) double "cl:number"
|
||||
%typemap(lispclass) char * "cl:string"
|
||||
|
||||
/* Array reference typemaps */
|
||||
%apply SWIGTYPE & { SWIGTYPE ((&)[ANY]) }
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
|
||||
%define SWIG_STD_ARRAY_INTERNAL(T, N)
|
||||
%typemap(csinterfaces) std::array< T, N > "global::System.IDisposable, global::System.Collections.IEnumerable\n , global::System.Collections.Generic.IEnumerable<$typemap(cstype, T)>\n";
|
||||
%typemap(csinterfaces) std::array< T, N > "global::System.IDisposable, global::System.Collections.IEnumerable\n , global::System.Collections.Generic.IEnumerable<$typemap(cstype, T)>\n"
|
||||
%proxycode %{
|
||||
public $csclassname(global::System.Collections.ICollection c) : this() {
|
||||
if (c == null)
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
// MACRO for use within the std::list class body
|
||||
%define SWIG_STD_LIST_MINIMUM_INTERNAL(CSINTERFACE, CTYPE...)
|
||||
%typemap(csinterfaces) std::list< CTYPE > "global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.CSINTERFACE<$typemap(cstype, CTYPE)>\n";
|
||||
%typemap(csinterfaces) std::list< CTYPE > "global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.CSINTERFACE<$typemap(cstype, CTYPE)>\n"
|
||||
|
||||
%apply void *VOID_INT_PTR { std::list< CTYPE >::iterator * };
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
/* K is the C++ key type, T is the C++ value type */
|
||||
%define SWIG_STD_MAP_INTERNAL(K, T, C)
|
||||
|
||||
%typemap(csinterfaces) std::map< K, T, C > "global::System.IDisposable \n , global::System.Collections.Generic.IDictionary<$typemap(cstype, K), $typemap(cstype, T)>\n";
|
||||
%typemap(csinterfaces) std::map< K, T, C > "global::System.IDisposable \n , global::System.Collections.Generic.IDictionary<$typemap(cstype, K), $typemap(cstype, T)>\n"
|
||||
%proxycode %{
|
||||
|
||||
public $typemap(cstype, T) this[$typemap(cstype, K) key] {
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace std {
|
|||
template <class T>
|
||||
class set {
|
||||
|
||||
%typemap(csinterfaces) std::set<T> "global::System.IDisposable, global::System.Collections.Generic.ISet<$typemap(cstype, T)>\n";
|
||||
%typemap(csinterfaces) std::set<T> "global::System.IDisposable, global::System.Collections.Generic.ISet<$typemap(cstype, T)>\n"
|
||||
%proxycode %{
|
||||
void global::System.Collections.Generic.ICollection<$typemap(cstype, T)>.Add($typemap(cstype, T) item) {
|
||||
((global::System.Collections.Generic.ISet<$typemap(cstype, T)>)this).Add(item);
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
// MACRO for use within the std::vector class body
|
||||
%define SWIG_STD_VECTOR_MINIMUM_INTERNAL(CSINTERFACE, CONST_REFERENCE, CTYPE...)
|
||||
%typemap(csinterfaces) std::vector< CTYPE > "global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.CSINTERFACE<$typemap(cstype, CTYPE)>\n";
|
||||
%typemap(csinterfaces) std::vector< CTYPE > "global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.CSINTERFACE<$typemap(cstype, CTYPE)>\n"
|
||||
%proxycode %{
|
||||
public $csclassname(global::System.Collections.IEnumerable c) : this() {
|
||||
if (c == null)
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
%typemap(in) void * {
|
||||
$1 = ($1_ltype)SWIG_MustGetPtr($input, NULL, $argnum, 0);
|
||||
}
|
||||
%typemap(freearg) void * "";
|
||||
%typemap(freearg) void * ""
|
||||
|
||||
%typemap(varin) SWIGTYPE * {
|
||||
$1 = ($1_ltype)SWIG_MustGetPtr($input, $descriptor, 1, 0);
|
||||
|
@ -321,14 +321,14 @@ SIMPLE_MAP(unsigned long long, scm_to_ulong_long, scm_from_ulong_long, integer);
|
|||
/* SWIG_scm2str makes a malloc'ed copy of the string, so get rid of it after
|
||||
the function call. */
|
||||
|
||||
%typemap (freearg) char * "if (must_free$argnum) SWIG_free($1);";
|
||||
%typemap (freearg) char * "if (must_free$argnum) SWIG_free($1);"
|
||||
%typemap (freearg) char **INPUT, char **BOTH "if (must_free$argnum) SWIG_free(*$1);"
|
||||
%typemap (freearg) char **OUTPUT "SWIG_free(*$1);"
|
||||
|
||||
/* But this shall not apply if we try to pass a single char by
|
||||
reference. */
|
||||
|
||||
%typemap (freearg) char *OUTPUT, char *BOTH "";
|
||||
%typemap (freearg) char *OUTPUT, char *BOTH ""
|
||||
|
||||
/* If we set a string variable, delete the old result first, unless const. */
|
||||
|
||||
|
@ -348,13 +348,13 @@ SIMPLE_MAP(unsigned long long, scm_to_ulong_long, scm_from_ulong_long, integer);
|
|||
|
||||
/* Void */
|
||||
|
||||
%typemap (out,doc="") void "gswig_result = SCM_UNSPECIFIED;";
|
||||
%typemap (out,doc="") void "gswig_result = SCM_UNSPECIFIED;"
|
||||
|
||||
/* SCM is passed through */
|
||||
|
||||
typedef unsigned long SCM;
|
||||
%typemap (in) SCM "$1=$input;";
|
||||
%typemap (out) SCM "$result=$1;";
|
||||
%typemap (in) SCM "$1=$input;"
|
||||
%typemap (out) SCM "$result=$1;"
|
||||
%typecheck(SWIG_TYPECHECK_POINTER) SCM "$1=1;";
|
||||
|
||||
/* ------------------------------------------------------------
|
||||
|
|
|
@ -248,7 +248,7 @@ $1=($1_ltype)&temp;%}
|
|||
|
||||
|
||||
// void (must be empty without the SWIG_arg++)
|
||||
%typemap(out) void "";
|
||||
%typemap(out) void ""
|
||||
|
||||
/* void* is a special case
|
||||
A function void fn(void*) should take any kind of pointer as a parameter (just like C/C++ does)
|
||||
|
|
|
@ -111,8 +111,8 @@
|
|||
$1 = ($1_type) SWIG_convert_int($input);
|
||||
}
|
||||
|
||||
%typemap(out) enum SWIGTYPE "$result = scheme_make_integer_value($1);";
|
||||
%typemap(varout) enum SWIGTYPE "$result = scheme_make_integer_value($1);";
|
||||
%typemap(out) enum SWIGTYPE "$result = scheme_make_integer_value($1);"
|
||||
%typemap(varout) enum SWIGTYPE "$result = scheme_make_integer_value($1);"
|
||||
|
||||
|
||||
/* Pass-by-value */
|
||||
|
@ -278,12 +278,12 @@ REF_MAP(double, SCHEME_REALP, scheme_real_to_double,
|
|||
|
||||
/* Void */
|
||||
|
||||
%typemap(out) void "$result = scheme_void;";
|
||||
%typemap(out) void "$result = scheme_void;"
|
||||
|
||||
/* Pass through Scheme_Object * */
|
||||
|
||||
%typemap (in) Scheme_Object * "$1=$input;";
|
||||
%typemap (out) Scheme_Object * "$result=$1;";
|
||||
%typemap (in) Scheme_Object * "$1=$input;"
|
||||
%typemap (out) Scheme_Object * "$result=$1;"
|
||||
%typecheck(SWIG_TYPECHECK_POINTER) Scheme_Object * "$1=1;";
|
||||
|
||||
|
||||
|
|
|
@ -188,12 +188,12 @@ SIMPLE_MAP(unsigned long long,caml_val_ulong,caml_long_val);
|
|||
|
||||
/* Void */
|
||||
|
||||
%typemap(out) void "$result = Val_unit;";
|
||||
%typemap(out) void "$result = Val_unit;"
|
||||
|
||||
/* Pass through value */
|
||||
|
||||
%typemap (in) CAML_VALUE "$1=$input;";
|
||||
%typemap (out) CAML_VALUE "$result=$1;";
|
||||
%typemap (in) CAML_VALUE "$1=$input;"
|
||||
%typemap (out) CAML_VALUE "$result=$1;"
|
||||
|
||||
#if 0
|
||||
%include <carray.i>
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
}
|
||||
%}
|
||||
|
||||
%typemap(classconsttab) SWIGTYPE (CLASS::*) "";
|
||||
%typemap(classconsttab) SWIGTYPE (CLASS::*) ""
|
||||
|
||||
%typemap(consttab) int,
|
||||
unsigned int,
|
||||
|
@ -100,4 +100,4 @@
|
|||
}
|
||||
|
||||
/* Handled as a global variable. */
|
||||
%typemap(consttab) SWIGTYPE (CLASS::*) "";
|
||||
%typemap(consttab) SWIGTYPE (CLASS::*) ""
|
||||
|
|
|
@ -457,7 +457,7 @@
|
|||
SWIG_SetPointerZval($input, SWIG_as_voidptr(new $1_ltype(SWIG_STD_MOVE($1))), $&1_descriptor, 1);
|
||||
%}
|
||||
|
||||
%typemap(out, phptype="void") void "";
|
||||
%typemap(out, phptype="void") void ""
|
||||
|
||||
%typemap(out, phptype="string") char [ANY]
|
||||
{
|
||||
|
|
|
@ -86,5 +86,5 @@ namespace std {
|
|||
|
||||
/* SWIG will apply the non-const typemap above to const string& without
|
||||
* this more specific typemap. */
|
||||
%typemap(argout) const string & "";
|
||||
%typemap(argout) const string & ""
|
||||
}
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
temp = (Z_TYPE($input) == IS_TRUE);
|
||||
$1 = &temp;
|
||||
%}
|
||||
%typemap(argout) TYPE *INPUT, TYPE &INPUT "";
|
||||
%typemap(in,numinputs=0) TYPE *OUTPUT(TYPE temp), TYPE &OUTPUT(TYPE temp) "$1 = &temp;";
|
||||
%typemap(argout) TYPE *INPUT, TYPE &INPUT ""
|
||||
%typemap(in,numinputs=0) TYPE *OUTPUT(TYPE temp), TYPE &OUTPUT(TYPE temp) "$1 = &temp;"
|
||||
%typemap(argout,fragment="t_output_helper") TYPE *OUTPUT, TYPE &OUTPUT
|
||||
{
|
||||
zval o;
|
||||
|
@ -57,8 +57,8 @@
|
|||
temp = (TYPE) zval_get_double(&$input);
|
||||
$1 = &temp;
|
||||
%}
|
||||
%typemap(argout) TYPE *INPUT, TYPE &INPUT "";
|
||||
%typemap(in,numinputs=0) TYPE *OUTPUT(TYPE temp), TYPE &OUTPUT(TYPE temp) "$1 = &temp;";
|
||||
%typemap(argout) TYPE *INPUT, TYPE &INPUT ""
|
||||
%typemap(in,numinputs=0) TYPE *OUTPUT(TYPE temp), TYPE &OUTPUT(TYPE temp) "$1 = &temp;"
|
||||
%typemap(argout,fragment="t_output_helper") TYPE *OUTPUT, TYPE &OUTPUT
|
||||
{
|
||||
zval o;
|
||||
|
@ -82,8 +82,8 @@
|
|||
temp = (TYPE) zval_get_long(&$input);
|
||||
$1 = &temp;
|
||||
%}
|
||||
%typemap(argout) TYPE *INPUT, TYPE &INPUT "";
|
||||
%typemap(in,numinputs=0) TYPE *OUTPUT(TYPE temp), TYPE &OUTPUT(TYPE temp) "$1 = &temp;";
|
||||
%typemap(argout) TYPE *INPUT, TYPE &INPUT ""
|
||||
%typemap(in,numinputs=0) TYPE *OUTPUT(TYPE temp), TYPE &OUTPUT(TYPE temp) "$1 = &temp;"
|
||||
%typemap(argout,fragment="t_output_helper") TYPE *OUTPUT, TYPE &OUTPUT
|
||||
{
|
||||
zval o;
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace swig {
|
|||
%apply PyObject * {SwigPtr_PyObject};
|
||||
%apply PyObject * const& {SwigPtr_PyObject const&};
|
||||
|
||||
%typemap(typecheck,precedence=SWIG_TYPECHECK_SWIGOBJECT,noblock=1) SwigPtr_PyObject const& "$1 = ($input != 0);";
|
||||
%typemap(typecheck,precedence=SWIG_TYPECHECK_SWIGOBJECT,noblock=1) SwigPtr_PyObject const& "$1 = ($input != 0);"
|
||||
|
||||
|
||||
/* For output */
|
||||
|
|
|
@ -2,43 +2,43 @@
|
|||
// Documentation for use with the autodoc feature.
|
||||
|
||||
#ifdef SWIG_DOC_DOXYGEN_STYLE
|
||||
%typemap(doc) SWIGTYPE "@param $1_name $1_type";
|
||||
%typemap(doc) SWIGTYPE * "@param $1_name $1_type";
|
||||
%typemap(doc) const SWIGTYPE & "@param $1_name $1_type";
|
||||
%typemap(doc) const SWIGTYPE && "@param $1_name $1_type";
|
||||
%typemap(doc) enum SWIGTYPE "@param $1_name enum $1_type";
|
||||
%typemap(doc) SWIGTYPE "@param $1_name $1_type"
|
||||
%typemap(doc) SWIGTYPE * "@param $1_name $1_type"
|
||||
%typemap(doc) const SWIGTYPE & "@param $1_name $1_type"
|
||||
%typemap(doc) const SWIGTYPE && "@param $1_name $1_type"
|
||||
%typemap(doc) enum SWIGTYPE "@param $1_name enum $1_type"
|
||||
|
||||
%typemap(doc) SWIGTYPE *INOUT, SWIGTYPE &INOUT "@param $1_name $1_type (input/output)";
|
||||
%typemap(doc) SWIGTYPE *INPUT, SWIGTYPE &INPUT "@param $1_name $1_type (input)";
|
||||
%typemap(doc) SWIGTYPE *OUTPUT, SWIGTYPE &OUTPUT "@param $1_name $1_type (output)";
|
||||
%typemap(doc) SWIGTYPE *INOUT, SWIGTYPE &INOUT "@param $1_name $1_type (input/output)"
|
||||
%typemap(doc) SWIGTYPE *INPUT, SWIGTYPE &INPUT "@param $1_name $1_type (input)"
|
||||
%typemap(doc) SWIGTYPE *OUTPUT, SWIGTYPE &OUTPUT "@param $1_name $1_type (output)"
|
||||
#else
|
||||
%typemap(doc) SWIGTYPE "$1_name: $1_type";
|
||||
%typemap(doc) SWIGTYPE * "$1_name: $1_type";
|
||||
%typemap(doc) const SWIGTYPE & "$1_name: $1_type";
|
||||
%typemap(doc) const SWIGTYPE && "$1_name: $1_type";
|
||||
%typemap(doc) enum SWIGTYPE "$1_name: enum $1_type";
|
||||
%typemap(doc) SWIGTYPE "$1_name: $1_type"
|
||||
%typemap(doc) SWIGTYPE * "$1_name: $1_type"
|
||||
%typemap(doc) const SWIGTYPE & "$1_name: $1_type"
|
||||
%typemap(doc) const SWIGTYPE && "$1_name: $1_type"
|
||||
%typemap(doc) enum SWIGTYPE "$1_name: enum $1_type"
|
||||
|
||||
%typemap(doc) SWIGTYPE *INOUT, SWIGTYPE &INOUT "$1_name: $1_type (input/output)";
|
||||
%typemap(doc) SWIGTYPE *INPUT, SWIGTYPE &INPUT "$1_name: $1_type (input)";
|
||||
%typemap(doc) SWIGTYPE *OUTPUT, SWIGTYPE &OUTPUT "$1_name: $1_type (output)";
|
||||
%typemap(doc) SWIGTYPE *INOUT, SWIGTYPE &INOUT "$1_name: $1_type (input/output)"
|
||||
%typemap(doc) SWIGTYPE *INPUT, SWIGTYPE &INPUT "$1_name: $1_type (input)"
|
||||
%typemap(doc) SWIGTYPE *OUTPUT, SWIGTYPE &OUTPUT "$1_name: $1_type (output)"
|
||||
#endif
|
||||
|
||||
|
||||
// Types to use in Python documentation for the parameters of the given C++ type.
|
||||
%typemap(doctype) bool "boolean";
|
||||
%typemap(doctype) bool "boolean"
|
||||
|
||||
%define int_doctype_for_cppint_type(cppint_type)
|
||||
%typemap(doctype) cppint_type, unsigned cppint_type "int";
|
||||
%typemap(doctype) cppint_type, unsigned cppint_type "int"
|
||||
%enddef
|
||||
%formacro(int_doctype_for_cppint_type, short, int, long, long long)
|
||||
|
||||
%typemap(doctype) size_t "int";
|
||||
%typemap(doctype) size_t "int"
|
||||
|
||||
%typemap(doctype) enum SWIGTYPE "int";
|
||||
%typemap(doctype) enum SWIGTYPE "int"
|
||||
|
||||
%typemap(doctype) float, double, long double "float";
|
||||
%typemap(doctype) float, double, long double "float"
|
||||
|
||||
%typemap(doctype) char*, std::string "string";
|
||||
%typemap(doctype) char*, std::string "string"
|
||||
|
||||
%typemap(doctype) SWIGTYPE "$1_basetype"
|
||||
%typemap(doctype) SWIGTYPE * "$typemap(doctype, $*1_ltype)"
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
{ SWIG_PY_POINTER, "$symname", 0, 0, (void *)($value), &$descriptor }
|
||||
%typemap(consttab) SWIGTYPE ((* const)(ANY)) = SWIGTYPE ((*)(ANY));
|
||||
|
||||
%typemap(constcode) SWIGTYPE ((*)(ANY)) "";
|
||||
%typemap(constcode) SWIGTYPE ((*)(ANY)) ""
|
||||
%typemap(constcode) SWIGTYPE ((* const)(ANY)) = SWIGTYPE ((*)(ANY));
|
||||
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ SWIG_InitializeModule(0);
|
|||
assert(all(sapply($input, class) == "$R_class"));
|
||||
%}
|
||||
|
||||
%typemap(out) void "";
|
||||
%typemap(out) void ""
|
||||
|
||||
%typemap(in) int *, int[ANY],
|
||||
signed int *, signed int[ANY],
|
||||
|
|
|
@ -3,26 +3,26 @@
|
|||
for use in class representations.
|
||||
*/
|
||||
|
||||
%typemap("rtype") int, int *, int & "integer";
|
||||
%typemap("rtype") long, long *, long & "integer";
|
||||
%typemap("rtype") float, float*, float & "numeric";
|
||||
%typemap("rtype") double, double*, double & "numeric";
|
||||
%typemap("rtype") char *, char ** "character";
|
||||
%typemap("rtype") char "character";
|
||||
%typemap("rtype") string, string *, string & "character";
|
||||
%typemap("rtype") std::string, std::string *, std::string & "character";
|
||||
%typemap("rtype") bool, bool * "logical";
|
||||
%typemap("rtype") enum SWIGTYPE "character";
|
||||
%typemap("rtype") enum SWIGTYPE * "character";
|
||||
%typemap("rtype") enum SWIGTYPE *const "character";
|
||||
%typemap("rtype") enum SWIGTYPE & "character";
|
||||
%typemap("rtype") const enum SWIGTYPE & "character";
|
||||
%typemap("rtype") enum SWIGTYPE && "character";
|
||||
%typemap("rtype") SWIGTYPE * "$R_class";
|
||||
%typemap("rtype") SWIGTYPE *const "$R_class";
|
||||
%typemap("rtype") SWIGTYPE & "$R_class";
|
||||
%typemap("rtype") SWIGTYPE && "$R_class";
|
||||
%typemap("rtype") SWIGTYPE "$&R_class";
|
||||
%typemap("rtype") int, int *, int & "integer"
|
||||
%typemap("rtype") long, long *, long & "integer"
|
||||
%typemap("rtype") float, float*, float & "numeric"
|
||||
%typemap("rtype") double, double*, double & "numeric"
|
||||
%typemap("rtype") char *, char ** "character"
|
||||
%typemap("rtype") char "character"
|
||||
%typemap("rtype") string, string *, string & "character"
|
||||
%typemap("rtype") std::string, std::string *, std::string & "character"
|
||||
%typemap("rtype") bool, bool * "logical"
|
||||
%typemap("rtype") enum SWIGTYPE "character"
|
||||
%typemap("rtype") enum SWIGTYPE * "character"
|
||||
%typemap("rtype") enum SWIGTYPE *const "character"
|
||||
%typemap("rtype") enum SWIGTYPE & "character"
|
||||
%typemap("rtype") const enum SWIGTYPE & "character"
|
||||
%typemap("rtype") enum SWIGTYPE && "character"
|
||||
%typemap("rtype") SWIGTYPE * "$R_class"
|
||||
%typemap("rtype") SWIGTYPE *const "$R_class"
|
||||
%typemap("rtype") SWIGTYPE & "$R_class"
|
||||
%typemap("rtype") SWIGTYPE && "$R_class"
|
||||
%typemap("rtype") SWIGTYPE "$&R_class"
|
||||
|
||||
%typemap("rtypecheck") int, int &, long, long &
|
||||
%{ (is.integer($arg) || is.numeric($arg)) && length($arg) == 1 %}
|
||||
|
|
|
@ -841,7 +841,7 @@
|
|||
%typemap("rtypecheck") std::vector<double>, std::vector<double> *, std::vector<double> &
|
||||
%{ is.numeric($arg) %}
|
||||
%typemap("rtype") std::vector<double> "numeric"
|
||||
%typemap("scoercein") std::vector<double>, std::vector<double> *, std::vector<double> & "$input = as.numeric($input);";
|
||||
%typemap("scoercein") std::vector<double>, std::vector<double> *, std::vector<double> & "$input = as.numeric($input);"
|
||||
|
||||
%typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector<float>)
|
||||
%traits_type_name(std::vector<float>)
|
||||
|
@ -857,7 +857,7 @@
|
|||
%typemap("rtypecheck") std::vector<bool>, std::vector<bool> *, std::vector<bool> &
|
||||
%{ is.logical($arg) %}
|
||||
%typemap("rtype") std::vector<bool> "logical"
|
||||
%typemap("scoercein") std::vector<bool> , std::vector<bool> & "$input = as.logical($input);";
|
||||
%typemap("scoercein") std::vector<bool> , std::vector<bool> & "$input = as.logical($input);"
|
||||
|
||||
|
||||
%typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector<int>);
|
||||
|
@ -866,7 +866,7 @@
|
|||
%{ is.integer($arg) || is.numeric($arg) %}
|
||||
|
||||
%typemap("rtype") std::vector<int> "integer"
|
||||
%typemap("scoercein") std::vector<int> , std::vector<int> *, std::vector<int> & "$input = as.integer($input);";
|
||||
%typemap("scoercein") std::vector<int> , std::vector<int> *, std::vector<int> & "$input = as.integer($input);"
|
||||
|
||||
// strings
|
||||
%typemap("rtype") std::vector< std::basic_string<char> >,
|
||||
|
@ -974,21 +974,21 @@ std::vector< std::basic_string<char> > *,
|
|||
%typemap("rtypecheck") std::vector<std::vector<int> >, std::vector<std::vector<int> > *, std::vector<std::vector<int> > &
|
||||
%{ is.list($arg) && all(sapply($arg , is.integer) || sapply($arg, is.numeric)) %}
|
||||
%typemap("rtype") std::vector<std::vector<int> >, std::vector<std::vector<int> > *, std::vector<std::vector<int> > & "list"
|
||||
%typemap("scoercein") std::vector< std::vector<int> >, std::vector<std::vector<int> > *, std::vector<std::vector<int> > & "$input = lapply($input, as.integer);";
|
||||
%typemap("scoercein") std::vector< std::vector<int> >, std::vector<std::vector<int> > *, std::vector<std::vector<int> > & "$input = lapply($input, as.integer);"
|
||||
|
||||
%typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector<std::vector<unsigned int> >);
|
||||
%traits_type_name(std::vector< std::vector<unsigned int> >);
|
||||
%typemap("rtypecheck") std::vector<std::vector<unsigned int> >, std::vector<std::vector<unsigned int> > *, std::vector<std::vector<unsigned int> > &
|
||||
%{ is.list($arg) && all(sapply($arg , is.integer) || sapply($arg, is.numeric)) %}
|
||||
%typemap("rtype") std::vector<std::vector<unsigned int> >, std::vector<std::vector<unsigned int> > *, std::vector<std::vector<unsigned int> > & "list"
|
||||
%typemap("scoercein") std::vector< std::vector<unsigned int> >, std::vector<std::vector<int> > *, std::vector<std::vector<unsigned int> > & "$input = lapply($input, as.integer);";
|
||||
%typemap("scoercein") std::vector< std::vector<unsigned int> >, std::vector<std::vector<int> > *, std::vector<std::vector<unsigned int> > & "$input = lapply($input, as.integer);"
|
||||
|
||||
%typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector<std::vector<float> >);
|
||||
%traits_type_name(std::vector< std::vector<float> >);
|
||||
%typemap("rtypecheck") std::vector<std::vector<float> >, std::vector<std::vector<float> > *, std::vector<std::vector<float> > &
|
||||
%{ is.list($arg) && all(sapply($arg , is.integer) || sapply($arg, is.numeric)) %}
|
||||
%typemap("rtype") std::vector<std::vector<float> >, std::vector<std::vector<float> > *, std::vector<std::vector<float> > "list"
|
||||
%typemap("scoercein") std::vector< std::vector<float> >, std::vector<std::vector<float> > *, std::vector<std::vector<float> > & "$input = lapply($input, as.numeric);";
|
||||
%typemap("scoercein") std::vector< std::vector<float> >, std::vector<std::vector<float> > *, std::vector<std::vector<float> > & "$input = lapply($input, as.numeric);"
|
||||
|
||||
%typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector<std::vector<double> >);
|
||||
%traits_type_name(std::vector< std::vector<double> >);
|
||||
|
@ -1003,7 +1003,7 @@ std::vector< std::basic_string<char> > *,
|
|||
%typemap("rtypecheck") std::vector<std::vector<bool> >, std::vector<std::vector<bool> > *, std::vector<std::vector<bool> > &
|
||||
%{ is.list($arg) && all(sapply($arg , is.integer) || sapply($arg, is.numeric)) %}
|
||||
%typemap("rtype") std::vector<std::vector<bool> >, std::vector<std::vector<bool> > *, std::vector<std::vector<bool> > & "list"
|
||||
%typemap("scoercein") std::vector< std::vector<bool> >, std::vector<std::vector<bool> > *, std::vector<std::vector<bool> > & "$input = lapply($input, as.logical);";
|
||||
%typemap("scoercein") std::vector< std::vector<bool> >, std::vector<std::vector<bool> > *, std::vector<std::vector<bool> > & "$input = lapply($input, as.logical);"
|
||||
|
||||
// we don't want these to be given R classes as they
|
||||
// have already been turned into R vectors.
|
||||
|
|
|
@ -139,7 +139,7 @@ output values.
|
|||
*/
|
||||
|
||||
%define OUTPUT_TYPEMAP(type, converter, convtype)
|
||||
%typemap(in,numinputs=0) type *OUTPUT($*1_ltype temp), type &OUTPUT($*1_ltype temp) "$1 = &temp;";
|
||||
%typemap(in,numinputs=0) type *OUTPUT($*1_ltype temp), type &OUTPUT($*1_ltype temp) "$1 = &temp;"
|
||||
%typemap(argout, fragment="output_helper") type *OUTPUT, type &OUTPUT {
|
||||
VALUE o = converter(convtype (*$1));
|
||||
$result = output_helper($result, o);
|
||||
|
@ -161,7 +161,7 @@ OUTPUT_TYPEMAP(double, rb_float_new, (double));
|
|||
|
||||
#undef OUTPUT_TYPEMAP
|
||||
|
||||
%typemap(in,numinputs=0) bool *OUTPUT(bool temp), bool &OUTPUT(bool temp) "$1 = &temp;";
|
||||
%typemap(in,numinputs=0) bool *OUTPUT(bool temp), bool &OUTPUT(bool temp) "$1 = &temp;"
|
||||
%typemap(argout, fragment="output_helper") bool *OUTPUT, bool &OUTPUT {
|
||||
VALUE o = (*$1) ? Qtrue : Qfalse;
|
||||
$result = output_helper($result, o);
|
||||
|
|
|
@ -448,9 +448,9 @@ namespace std {
|
|||
/* Set up the typemap for handling new return strings */
|
||||
|
||||
#ifdef __cplusplus
|
||||
%typemap(newfree) char * "delete [] $1;";
|
||||
%typemap(newfree) char * "delete [] $1;"
|
||||
#else
|
||||
%typemap(newfree) char * "free($1);";
|
||||
%typemap(newfree) char * "free($1);"
|
||||
#endif
|
||||
|
||||
/* Default typemap for handling char * members */
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
%typemap(in,noblock=1,numinputs=0) TYPEMAP (Char temp[MAX+1]) {
|
||||
$1 = ($1_ltype) temp;
|
||||
}
|
||||
%typemap(freearg,match="in") TYPEMAP "";
|
||||
%typemap(freearg,match="in") TYPEMAP ""
|
||||
%typemap(argout,noblock=1,fragment= #SWIG_FromCharPtr ) TYPEMAP {
|
||||
$1[MAX] = 0;
|
||||
%append_output(SWIG_FromCharPtr($1));
|
||||
|
@ -85,7 +85,7 @@
|
|||
%typemap(in,noblock=1,numinputs=0) TYPEMAP(Char temp[SIZE]) {
|
||||
$1 = ($1_ltype) temp;
|
||||
}
|
||||
%typemap(freearg,match="in") TYPEMAP "";
|
||||
%typemap(freearg,match="in") TYPEMAP ""
|
||||
%typemap(argout,noblock=1,fragment= #SWIG_FromCharPtrAndSize) TYPEMAP {
|
||||
%append_output(SWIG_FromCharPtrAndSize($1,SIZE));
|
||||
}
|
||||
|
@ -122,7 +122,7 @@
|
|||
temp[n - 1] = 0;
|
||||
$1 = ($1_ltype) temp;
|
||||
}
|
||||
%typemap(freearg,match="in") TYPEMAP "";
|
||||
%typemap(freearg,match="in") TYPEMAP ""
|
||||
%typemap(argout,noblock=1,fragment=#SWIG_FromCharPtr) TYPEMAP {
|
||||
$1[MAX] = 0;
|
||||
%append_output(SWIG_FromCharPtr($1));
|
||||
|
@ -160,7 +160,7 @@
|
|||
if (alloc == SWIG_NEWOBJ) %delete_array(t);
|
||||
$1[n-1] = 0;
|
||||
}
|
||||
%typemap(freearg,match="in") TYPEMAP "";
|
||||
%typemap(freearg,match="in") TYPEMAP ""
|
||||
%typemap(argout,noblock=1,fragment=#SWIG_FromCharPtr) TYPEMAP {
|
||||
%append_output(SWIG_FromCharPtr($1));
|
||||
%delete_array($1);
|
||||
|
@ -247,7 +247,7 @@
|
|||
%typemap(in,noblock=1,numinputs=0) TYPEMAP($*1_ltype temp = 0) {
|
||||
$1 = &temp;
|
||||
}
|
||||
%typemap(freearg,match="in") TYPEMAP "";
|
||||
%typemap(freearg,match="in") TYPEMAP ""
|
||||
%typemap(argout,noblock=1,fragment=#SWIG_FromCharPtr) TYPEMAP {
|
||||
if (*$1) {
|
||||
%append_output(SWIG_FromCharPtr(*$1));
|
||||
|
@ -275,7 +275,7 @@
|
|||
%typemap(in,noblock=1,numinputs=0) (TYPEMAP, SIZE) ($*1_ltype temp = 0, $*2_ltype tempn) {
|
||||
$1 = &temp; $2 = &tempn;
|
||||
}
|
||||
%typemap(freearg,match="in") (TYPEMAP,SIZE) "";
|
||||
%typemap(freearg,match="in") (TYPEMAP,SIZE) ""
|
||||
%typemap(argout,noblock=1,fragment=#SWIG_FromCharPtrAndSize)(TYPEMAP,SIZE) {
|
||||
if (*$1) {
|
||||
%append_output(SWIG_FromCharPtrAndSize(*$1,*$2));
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
$1 = *ptr;
|
||||
if (SWIG_IsNewObj(res)) %delete(ptr);
|
||||
}
|
||||
%typemap(freearg) Type "";
|
||||
%typemap(freearg) Type ""
|
||||
%typemap(in,fragment=frag) const Type & (int res = SWIG_OLDOBJ) {
|
||||
Type *ptr = (Type *)0;
|
||||
res = asptr_meth($input, &ptr);
|
||||
|
|
|
@ -266,7 +266,7 @@
|
|||
}
|
||||
$1 = %reinterpret_cast(temp, $1_ltype);
|
||||
}
|
||||
%typemap(freearg) Char [ANY], const Char [ANY] "";
|
||||
%typemap(freearg) Char [ANY], const Char [ANY] ""
|
||||
|
||||
%typemap(in,noblock=1,fragment=#SWIG_AsCharArray) const Char (&)[ANY] (Char temp[$1_dim0], int res)
|
||||
{
|
||||
|
@ -276,7 +276,7 @@
|
|||
}
|
||||
$1 = &temp;
|
||||
}
|
||||
%typemap(freearg) const Char (&)[ANY] "";
|
||||
%typemap(freearg) const Char (&)[ANY] ""
|
||||
|
||||
%typemap(out,fragment=#SWIG_FromCharPtrAndSize,fragment=#SWIG_CharBufLen)
|
||||
Char [ANY], const Char[ANY]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Language Object * - Just pass straight through unmodified
|
||||
* ------------------------------------------------------------ */
|
||||
|
||||
%typemap(in) SWIG_Object "$1 = $input;";
|
||||
%typemap(in) SWIG_Object "$1 = $input;"
|
||||
|
||||
%typemap(in,noblock=1) SWIG_Object const & ($*ltype temp)
|
||||
{
|
||||
|
@ -30,8 +30,8 @@
|
|||
|
||||
#if defined(SWIG_DIRECTOR_TYPEMAPS)
|
||||
|
||||
%typemap(directorin) SWIG_Object "$input = $1;";
|
||||
%typemap(directorout) SWIG_Object "$result = $input;";
|
||||
%typemap(directorin) SWIG_Object "$input = $1;"
|
||||
%typemap(directorout) SWIG_Object "$result = $input;"
|
||||
|
||||
#endif /* SWIG_DIRECTOR_TYPEMAPS */
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
}
|
||||
$1 = %reinterpret_cast(argp, $ltype);
|
||||
}
|
||||
%typemap(freearg) SWIGTYPE * "";
|
||||
%typemap(freearg) SWIGTYPE * ""
|
||||
|
||||
%typemap(in, noblock=1) SWIGTYPE [] (void *argp = 0, int res = 0) {
|
||||
res = SWIG_ConvertPtr($input, &argp,$descriptor, $disown | %convertptr_flags);
|
||||
|
@ -18,7 +18,7 @@
|
|||
}
|
||||
$1 = %reinterpret_cast(argp, $ltype);
|
||||
}
|
||||
%typemap(freearg) SWIGTYPE [] "";
|
||||
%typemap(freearg) SWIGTYPE [] ""
|
||||
|
||||
|
||||
%typemap(in, noblock=1) SWIGTYPE *const& (void *argp = 0, int res = 0, $*1_ltype temp) {
|
||||
|
@ -29,7 +29,7 @@
|
|||
temp = %reinterpret_cast(argp, $*ltype);
|
||||
$1 = %reinterpret_cast(&temp, $1_ltype);
|
||||
}
|
||||
%typemap(freearg) SWIGTYPE *const& "";
|
||||
%typemap(freearg) SWIGTYPE *const& ""
|
||||
|
||||
|
||||
/* Reference */
|
||||
|
@ -41,7 +41,7 @@
|
|||
if (!argp) { %argument_nullref("$type", $symname, $argnum); }
|
||||
$1 = %reinterpret_cast(argp, $ltype);
|
||||
}
|
||||
%typemap(freearg) SWIGTYPE & "";
|
||||
%typemap(freearg) SWIGTYPE & ""
|
||||
|
||||
#if defined(__cplusplus) && defined(%implicitconv_flag)
|
||||
%typemap(in,noblock=1,implicitconv=1) const SWIGTYPE & (void *argp = 0, int res = 0) {
|
||||
|
@ -76,7 +76,7 @@
|
|||
if (!argp) { %argument_nullref("$type", $symname, $argnum); }
|
||||
$1 = %reinterpret_cast(argp, $ltype);
|
||||
}
|
||||
%typemap(freearg) SWIGTYPE && "";
|
||||
%typemap(freearg) SWIGTYPE && ""
|
||||
|
||||
#if defined(__cplusplus) && defined(%implicitconv_flag)
|
||||
%typemap(in,noblock=1,implicitconv=1) const SWIGTYPE && (void *argp = 0, int res = 0) {
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
}
|
||||
$1 = %static_cast(val,$ltype);
|
||||
}
|
||||
%typemap(freearg) Type "";
|
||||
%typemap(freearg) Type ""
|
||||
%typemap(in,noblock=1,fragment=frag) const Type & ($*ltype temp, Type val, int ecode = 0) {
|
||||
ecode = asval_meth($input, &val);
|
||||
if (!SWIG_IsOK(ecode)) {
|
||||
|
@ -47,7 +47,7 @@
|
|||
temp = %static_cast(val, $*ltype);
|
||||
$1 = &temp;
|
||||
}
|
||||
%typemap(freearg) const Type& "";
|
||||
%typemap(freearg) const Type& ""
|
||||
%enddef
|
||||
|
||||
/* out */
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
%argument_fail(res, "$type", $symname, $argnum);
|
||||
}
|
||||
}
|
||||
%typemap(freearg) void * "";
|
||||
%typemap(freearg) void * ""
|
||||
|
||||
%typemap(in,noblock=1) void * const& ($*ltype temp = 0, int res) {
|
||||
res = SWIG_ConvertPtr($input, %as_voidptrptr(&temp), 0, $disown);
|
||||
|
@ -19,7 +19,7 @@
|
|||
}
|
||||
$1 = &temp;
|
||||
}
|
||||
%typemap(freearg) void * const& "";
|
||||
%typemap(freearg) void * const& ""
|
||||
|
||||
|
||||
/* out */
|
||||
|
|
Loading…
Reference in New Issue