Skip to content

Commit 2988f54

Browse files
committed
Merge squashed minimal changes
2 parents adf4239 + 029bc7f commit 2988f54

34 files changed

+264
-259
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,3 +224,4 @@ Examples/r/*/.RData
224224
# Scilab
225225
Examples/test-suite/scilab/*/
226226
loader.sce
227+

Doc/Manual/Tcl.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2819,7 +2819,7 @@ <H3><a name="Tcl_nn38">38.7.4 Converting a Tcl list to a char ** </a></H3>
28192819

28202820
// This gives SWIG some cleanup code that will get called after the function call
28212821
%typemap(freearg) char ** {
2822-
free($1);
2822+
free($1);
28232823
}
28242824

28252825
// Now a test functions

Examples/test-suite/arrays.i

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ This test case tests that various types of arrays are working.
33
*/
44

55
%module arrays
6-
76
%{
87
#include <stdlib.h>
98
%}
@@ -12,7 +11,6 @@ This test case tests that various types of arrays are working.
1211
%rename(ArrSt) ArrayStruct;
1312
#endif
1413

15-
1614
%inline %{
1715
#define ARRAY_LEN 2
1816

@@ -79,11 +77,10 @@ void array_pointer_func(int (*x)[10]) {}
7977
%inline %{
8078
typedef float FLOAT;
8179

82-
typedef FLOAT cartPosition_t[3];
80+
typedef FLOAT cartPosition_t[3];
8381

8482
typedef struct {
8583
cartPosition_t p;
8684
} CartPoseData_t;
8785

8886
%}
89-

Examples/test-suite/common.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ TARGETSUFFIX =
6565
SWIGOPT = -outcurrentdir -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)
6666
INCLUDES = -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)
6767
LIBS = -L.
68+
LIBPREFIX = lib
6869
ACTION = check
6970
INTERFACEDIR = ../
7071
SRCDIR = $(srcdir)/

Examples/test-suite/constant_pointers.i

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This testcase primarily test constant pointers, eg int* const. Only a getter is
1111

1212
%warnfilter(SWIGWARN_TYPEMAP_SWIGTYPELEAK); /* memory leak when setting a ptr/ref variable */
1313
%warnfilter(SWIGWARN_TYPEMAP_SWIGTYPELEAK_MSG); /* Setting a pointer/reference variable may leak memory. */
14-
14+
1515

1616
%inline %{
1717

@@ -93,7 +93,7 @@ int* const globalRet2() {return &GlobalInt;}
9393
%}
9494

9595

96-
%inline
96+
%inline
9797
{
9898
typedef const A* Acptr;
9999

@@ -108,7 +108,7 @@ int* const globalRet2() {return &GlobalInt;}
108108
A a;
109109
A* ap;
110110
const A* cap;
111-
Acptr acptr;
111+
Acptr acptr;
112112
};
113113

114114
const B* bar(const B* b) {
@@ -132,13 +132,13 @@ static int **wxEVT_COMMAND_BUTTON_CLICKEDpp = &wxEVT_COMMAND_BUTTON_CLICKEDp;
132132

133133
char lang1[16] = "Hello";
134134
char *langs[] ={ lang1 };
135-
136-
135+
136+
137137
%}
138138

139139

140140
%inline {
141-
#define EWXWEXPORT_VAR
141+
#define EWXWEXPORT_VAR
142142

143143
const int* wxEVENT_COMMAND_BUTTON_CLICKEDr = (int*) &wxEVT_COMMAND_BUTTON_CLICKEDv;
144144
const int* wxEVENT_COMMAND_BUTTON_CLICKEDp = (int*) *wxEVT_COMMAND_BUTTON_CLICKEDpp;

Examples/test-suite/contract.i

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
%module contract
22

33
%warnfilter(SWIGWARN_RUBY_MULTIPLE_INHERITANCE,
4-
SWIGWARN_JAVA_MULTIPLE_INHERITANCE,
5-
SWIGWARN_CSHARP_MULTIPLE_INHERITANCE,
6-
SWIGWARN_D_MULTIPLE_INHERITANCE,
7-
SWIGWARN_FORTRAN_MULTIPLE_INHERITANCE,
8-
SWIGWARN_PHP_MULTIPLE_INHERITANCE) C; /* Ruby, C#, D, Java, PHP multiple inheritance */
4+
SWIGWARN_JAVA_MULTIPLE_INHERITANCE,
5+
SWIGWARN_CSHARP_MULTIPLE_INHERITANCE,
6+
SWIGWARN_D_MULTIPLE_INHERITANCE,
7+
SWIGWARN_FORTRAN_MULTIPLE_INHERITANCE,
8+
SWIGWARN_PHP_MULTIPLE_INHERITANCE) C; /* Ruby, C#, D, Java, PHP multiple inheritance */
99

1010
#ifdef SWIGCSHARP
1111
%ignore B::bar; // otherwise get a warning: `C.bar' no suitable methods found to override
@@ -17,20 +17,20 @@
1717

1818
%contract test_preassert(int a, int b) {
1919
require:
20-
a > 0;
21-
b > 0;
20+
a > 0;
21+
b > 0;
2222
}
2323

2424
%contract test_postassert(int a) {
2525
ensure:
26-
test_postassert > 0;
26+
test_postassert > 0;
2727
}
2828

2929
%contract test_prepost(int a, int b) {
3030
require:
31-
a > 0;
31+
a > 0;
3232
ensure:
33-
test_prepost > 0;
33+
test_prepost > 0;
3434
}
3535

3636
%inline %{
@@ -45,7 +45,7 @@ int test_postassert(int x) {
4545
}
4646

4747
int test_prepost(int x, int y) {
48-
return x+y;
48+
return x+y;
4949
}
5050
%}
5151

@@ -86,27 +86,27 @@ int test_prepost(int x, int y) {
8686
class Foo {
8787
public:
8888
virtual ~Foo() { }
89-
90-
virtual int test_preassert(int x, int y) {
89+
90+
virtual int test_preassert(int x, int y) {
9191
if ((x > 0) && (y > 0)) return 1;
9292
return 0;
93-
}
94-
virtual int test_postassert(int x) {
95-
return x;
96-
}
97-
virtual int test_prepost(int x, int y) {
98-
return x+y;
99-
}
100-
static int stest_prepost(int x, int y) {
101-
return x+y;
102-
}
93+
}
94+
virtual int test_postassert(int x) {
95+
return x;
96+
}
97+
virtual int test_prepost(int x, int y) {
98+
return x+y;
99+
}
100+
static int stest_prepost(int x, int y) {
101+
return x+y;
102+
}
103103
};
104104

105105
class Bar : public Foo {
106106
public:
107-
virtual int test_prepost(int x, int y) {
108-
return x+y;
109-
}
107+
virtual int test_prepost(int x, int y) {
108+
return x+y;
109+
}
110110
};
111111

112112
%}
@@ -155,7 +155,7 @@ public:
155155
virtual ~A() {}
156156
virtual int foo(int a, int b, int c, int d, int e) {
157157
if ((a > 0) && (b > 0) && (c > 0) && (d > 0) && (e > 0)) {
158-
return 1;
158+
return 1;
159159
}
160160
return 0;
161161
}
@@ -166,7 +166,7 @@ public:
166166
virtual ~B() {}
167167
virtual int bar(int a, int b, int c, int d, int e) {
168168
if ((a > 0) && (b > 0) && (c > 0) && (d > 0) && (e > 0)) {
169-
return 1;
169+
return 1;
170170
}
171171
return 0;
172172
}
@@ -181,7 +181,7 @@ public:
181181
return B::bar(a,b,c,d,e);
182182
}
183183
};
184-
184+
185185
class D : public C {
186186
public:
187187
virtual int foo(int a, int b, int c, int d, int e) {
@@ -217,7 +217,7 @@ namespace myNames {
217217
class myClass
218218
{
219219
public:
220-
myClass(int i) {}
220+
myClass(int i) {}
221221
};
222222

223223
}
@@ -233,7 +233,7 @@ require:
233233
class myClass
234234
{
235235
public:
236-
myClass(int i) {}
236+
myClass(int i) {}
237237
};
238238

239239
}

Examples/test-suite/default_constructor.i

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public:
6868

6969
/* This class does not get a default constructor */
7070
class DD: public D {
71-
71+
7272
};
7373

7474
/* No default constructor. A is okay, but D is not */
@@ -101,7 +101,7 @@ public:
101101
void foo(int, int) { }
102102
friend void bar(F *);
103103
void destroy() { delete this; }
104-
104+
105105
};
106106

107107
void bar(F *) { }
@@ -111,7 +111,7 @@ void bar(F *) { }
111111
#endif
112112

113113
// Single inheritance, base has private destructor
114-
class FFF : public F {
114+
class FFF : public F {
115115
};
116116

117117
// Multiple inheritance, one base has private destructor
@@ -133,11 +133,11 @@ public:
133133
static void destroy(G *g) { delete g; }
134134
};
135135

136-
class GG : public G {
136+
class GG : public G {
137137
};
138138

139139
template <class T>
140-
class HH_T
140+
class HH_T
141141
{
142142

143143

@@ -146,16 +146,16 @@ public:
146146
HH_T(int i,int j)
147147
{
148148
}
149-
149+
150150

151151
protected:
152152
HH_T();
153-
153+
154154
};
155-
156-
155+
156+
157157
%}
158-
158+
159159

160160
%template(HH) HH_T<int>;
161161

@@ -172,7 +172,7 @@ protected:
172172
// It's unclear to me what this typedef is trying to do. The result compiles
173173
// with Python but does not compile in Fortran. The OSRSpatialReferenceShadow
174174
// class is untested in any language.
175-
typedef void OSRSpatialReferenceShadow;
175+
typedef void OSRSpatialReferenceShadow;
176176
#endif
177177

178178
class OSRSpatialReferenceShadow {
@@ -182,7 +182,7 @@ public:
182182
OSRSpatialReferenceShadow( char const * wkt = "" ) {
183183
return 0;
184184
}
185-
}
185+
}
186186
};
187187

188188
%inline %{
@@ -192,4 +192,4 @@ bool is_python_builtin() { return true; }
192192
bool is_python_builtin() { return false; }
193193
#endif
194194
%}
195-
195+

Examples/test-suite/director_thread.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ extern "C" {
104104
%#endif
105105
MilliSecondSleep(500);
106106
}
107-
107+
108108
void setThreadName() {
109109
%#ifdef _WIN32
110110
%#else

Examples/test-suite/dynamic_cast.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
class Foo {
2020
public:
2121
virtual ~Foo() { }
22-
22+
2323
virtual Foo *blah() {
2424
return this;
2525
}

Examples/test-suite/enum_thorough.i

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -101,33 +101,33 @@ const SpeedClass::speed & speedTest5(const SpeedClass::speed &s) { return s
101101

102102
typedef enum { NamedAnon1, NamedAnon2 } namedanon;
103103

104-
namedanon namedanonTest1(namedanon e) { return e; }
104+
namedanon namedanonTest1(namedanon e) { return e; }
105105

106106
typedef enum twonamestag { TwoNames1, TwoNames2, TwoNames3 = 33 } twonames;
107107

108-
twonames twonamesTest1(twonames e) { return e; }
109-
twonamestag twonamesTest2(twonamestag e) { return e; }
110-
enum twonamestag twonamesTest3(enum twonamestag e) { return e; }
108+
twonames twonamesTest1(twonames e) { return e; }
109+
twonamestag twonamesTest2(twonamestag e) { return e; }
110+
enum twonamestag twonamesTest3(enum twonamestag e) { return e; }
111111

112112
struct TwoNamesStruct {
113113
typedef enum twonamestag { TwoNamesStruct1, TwoNamesStruct2 } twonames;
114-
twonames twonamesTest1(twonames e) { return e; }
115-
twonamestag twonamesTest2(twonamestag e) { return e; }
116-
enum twonamestag twonamesTest3(enum twonamestag e) { return e; }
114+
twonames twonamesTest1(twonames e) { return e; }
115+
twonamestag twonamesTest2(twonamestag e) { return e; }
116+
enum twonamestag twonamesTest3(enum twonamestag e) { return e; }
117117
};
118118

119119
namespace AnonSpace{
120120
typedef enum { NamedAnonSpace1, NamedAnonSpace2 } namedanonspace;
121-
namedanonspace namedanonspaceTest1(namedanonspace e) { return e; }
122-
AnonSpace::namedanonspace namedanonspaceTest2(AnonSpace::namedanonspace e) { return e; }
121+
namedanonspace namedanonspaceTest1(namedanonspace e) { return e; }
122+
AnonSpace::namedanonspace namedanonspaceTest2(AnonSpace::namedanonspace e) { return e; }
123123
}
124-
AnonSpace::namedanonspace namedanonspaceTest3(AnonSpace::namedanonspace e) { return e; }
124+
AnonSpace::namedanonspace namedanonspaceTest3(AnonSpace::namedanonspace e) { return e; }
125125
using namespace AnonSpace;
126-
namedanonspace namedanonspaceTest4(namedanonspace e) { return e; }
126+
namedanonspace namedanonspaceTest4(namedanonspace e) { return e; }
127127

128128

129129
template<typename T> struct TemplateClass {
130-
enum scientists { einstein, galileo = 10 };
130+
enum scientists { einstein, galileo = 10 };
131131
typedef enum scientists scientiststd1;
132132
typedef scientists scientiststd2;
133133
typedef scientiststd1 scientiststd3;
@@ -164,7 +164,7 @@ const TemplateClass<int>::scientiststd3 & scientistsTest8(const TemplateClass<
164164

165165
namespace Name {
166166
template<typename T> struct TClass {
167-
enum scientists { faraday, bell = 20 };
167+
enum scientists { faraday, bell = 20 };
168168
typedef enum scientists scientiststd1;
169169
typedef scientists scientiststd2;
170170
typedef scientiststd1 scientiststd3;

0 commit comments

Comments
 (0)