Skip to content

Commit 715c1a0

Browse files
committed
Revert "DELETEME?: superficial changes not needed"
This reverts commit 9dddccadc4a0f280ae76fca02514cc1ecf288102.
1 parent b601858 commit 715c1a0

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

Examples/test-suite/features.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// This testcase checks that %feature is working for templates and non user supplied constructors/destructors and is just generally working
1010

1111
// If the default %exception is used it will not compile. It shouldn't get used.
12-
%exception "#error Exception code should not have been inserted;";
12+
%exception "this_will_not_compile";
1313

1414
// Test 1: Test for no user supplied constructors and destructor
1515
%exception Simple::Simple(const Simple&) "$action /*Simple::Simple*/";

Examples/test-suite/member_pointer.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ PerimeterFunc_td perimetervar_td = &Shape::perimeter;
119119
/* Some constants */
120120
%constant double (Shape::*AREAPT)(void) = &Shape::area;
121121
%constant double (Shape::*PERIMPT)(void) = &Shape::perimeter;
122-
%constant double (Shape::*NULLPT)(void) = NULL;
122+
%constant double (Shape::*NULLPT)(void) = 0;
123123

124124
/*
125125
%inline %{

Examples/test-suite/primitive_types.i

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,19 @@
3434
3535
to the following:
3636
37-
%typemap(in) const char & ($1_basetype temp),
38-
const signed char & ($1_basetype temp),
39-
const unsigned char & ($1_basetype temp),
40-
const short & ($1_basetype temp),
41-
const unsigned short & ($1_basetype temp),
42-
const int & ($1_basetype temp),
43-
const unsigned int & ($1_basetype temp),
44-
const long & ($1_basetype temp),
45-
const unsigned long & ($1_basetype temp),
46-
const long long & ($1_basetype temp),
47-
const float & ($1_basetype temp),
48-
const double & ($1_basetype temp)
49-
%{ temp = ($1_basetype)$input; $1 = &temp; %}
37+
%typemap(in) const char & ($basetype temp),
38+
const signed char & ($basetype temp),
39+
const unsigned char & ($basetype temp),
40+
const short & ($basetype temp),
41+
const unsigned short & ($basetype temp),
42+
const int & ($basetype temp),
43+
const unsigned int & ($basetype temp),
44+
const long & ($basetype temp),
45+
const unsigned long & ($basetype temp),
46+
const long long & ($basetype temp),
47+
const float & ($basetype temp),
48+
const double & ($basetype temp)
49+
%{ temp = ($basetype)$input; $1 = &temp; %}
5050
5151
the other typical change is to add the enum SWIGTYPE to the
5252
integer throws typemaps:

Source/Swig/cwrap.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,9 +1435,9 @@ int Swig_MembersetToFunction(Node *n, String *classname, int flags) {
14351435
String *cres;
14361436
String *code = Getattr(n, "code");
14371437

1438-
String *membername = Swig_name_member(0, classname, name);
1439-
String *sname = Swig_name_set(0, membername);
1440-
String *mangled = Swig_name_mangle(sname);
1438+
String *sname = Swig_name_set(0, name);
1439+
String *membername = Swig_name_member(0, classname, sname);
1440+
String *mangled = Swig_name_mangle(membername);
14411441

14421442
if (code) {
14431443
/* I don't think this ever gets run - WSF */
@@ -1517,9 +1517,9 @@ int Swig_MembergetToFunction(Node *n, String *classname, int flags) {
15171517
String *cres;
15181518
String *code = Getattr(n, "code");
15191519

1520-
String *membername = Swig_name_member(0, classname, name);
1521-
String *gname = Swig_name_get(0, membername);
1522-
String *mangled = Swig_name_mangle(gname);
1520+
String *gname = Swig_name_get(0, name);
1521+
String *membername = Swig_name_member(0, classname, gname);
1522+
String *mangled = Swig_name_mangle(membername);
15231523

15241524
if (code) {
15251525
/* I don't think this ever gets run - WSF */

0 commit comments

Comments
 (0)