Skip to content

Commit 36c9e5f

Browse files
committed
Fix regressed marshalling of lists in C++/CLI
Signed-off-by: Dimitar Dobrev <[email protected]>
1 parent a178108 commit 36c9e5f

File tree

17 files changed

+5900
-5832
lines changed

17 files changed

+5900
-5832
lines changed

src/CppParser/Bindings/CLI/AST.cpp

Lines changed: 406 additions & 397 deletions
Large diffs are not rendered by default.

src/CppParser/Bindings/CLI/AST.h

Lines changed: 134 additions & 134 deletions
Large diffs are not rendered by default.

src/CppParser/Bindings/CLI/CppParser.cpp

Lines changed: 263 additions & 251 deletions
Large diffs are not rendered by default.

src/CppParser/Bindings/CLI/CppParser.h

Lines changed: 97 additions & 97 deletions
Large diffs are not rendered by default.

src/CppParser/Bindings/CLI/Decl.cpp

Lines changed: 1277 additions & 1244 deletions
Large diffs are not rendered by default.

src/CppParser/Bindings/CLI/Decl.h

Lines changed: 304 additions & 304 deletions
Large diffs are not rendered by default.

src/CppParser/Bindings/CLI/Expr.cpp

Lines changed: 1824 additions & 1819 deletions
Large diffs are not rendered by default.

src/CppParser/Bindings/CLI/Expr.h

Lines changed: 275 additions & 275 deletions
Large diffs are not rendered by default.

src/CppParser/Bindings/CLI/Sources.cpp

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,36 @@
99
using namespace System;
1010
using namespace System::Runtime::InteropServices;
1111

12-
CppSharp::Parser::SourceLocation::SourceLocation(::CppSharp::CppParser::SourceLocation* native)
12+
CppSharp::Parser::SourceLocation::SourceLocation(struct ::CppSharp::CppParser::SourceLocation* native)
1313
{
1414
__ID = native->ID;
1515
}
1616

1717
CppSharp::Parser::SourceLocation^ CppSharp::Parser::SourceLocation::__CreateInstance(::System::IntPtr native)
1818
{
19-
return gcnew ::CppSharp::Parser::SourceLocation((::CppSharp::CppParser::SourceLocation*) native.ToPointer());
19+
return gcnew ::CppSharp::Parser::SourceLocation((struct ::CppSharp::CppParser::SourceLocation*) native.ToPointer());
2020
}
2121

22-
CppSharp::Parser::SourceLocation::SourceLocation(::CppSharp::CppParser::SourceLocation* native, bool ownNativeInstance)
22+
CppSharp::Parser::SourceLocation::SourceLocation(struct ::CppSharp::CppParser::SourceLocation* native, bool ownNativeInstance)
2323
{
2424
__ID = native->ID;
2525
}
2626

2727
CppSharp::Parser::SourceLocation^ CppSharp::Parser::SourceLocation::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance)
2828
{
29-
return gcnew ::CppSharp::Parser::SourceLocation((::CppSharp::CppParser::SourceLocation*) native.ToPointer(), __ownsNativeInstance);
29+
return gcnew ::CppSharp::Parser::SourceLocation((struct ::CppSharp::CppParser::SourceLocation*) native.ToPointer(), __ownsNativeInstance);
3030
}
3131

3232
CppSharp::Parser::SourceLocation::SourceLocation(unsigned int ID)
3333
{
34-
::CppSharp::CppParser::SourceLocation _native(ID);
34+
struct ::CppSharp::CppParser::SourceLocation _native(ID);
3535
this->ID = _native.ID;
3636
}
3737

3838
CppSharp::Parser::SourceLocation::operator CppSharp::Parser::SourceLocation(unsigned int ID)
3939
{
4040
auto __ret = (::CppSharp::CppParser::SourceLocation) ID;
41-
return ::CppSharp::Parser::SourceLocation((::CppSharp::CppParser::SourceLocation*)&__ret);
41+
return ::CppSharp::Parser::SourceLocation((struct ::CppSharp::CppParser::SourceLocation*)&__ret);
4242
}
4343

4444
unsigned int CppSharp::Parser::SourceLocation::ID::get()
@@ -51,26 +51,26 @@ void CppSharp::Parser::SourceLocation::ID::set(unsigned int value)
5151
__ID = value;
5252
}
5353

54-
CppSharp::Parser::SourceRange::SourceRange(::CppSharp::CppParser::SourceRange* native)
54+
CppSharp::Parser::SourceRange::SourceRange(struct ::CppSharp::CppParser::SourceRange* native)
5555
: __ownsNativeInstance(false)
5656
{
5757
NativePtr = native;
5858
}
5959

6060
CppSharp::Parser::SourceRange^ CppSharp::Parser::SourceRange::__CreateInstance(::System::IntPtr native)
6161
{
62-
return gcnew ::CppSharp::Parser::SourceRange((::CppSharp::CppParser::SourceRange*) native.ToPointer());
62+
return gcnew ::CppSharp::Parser::SourceRange((struct ::CppSharp::CppParser::SourceRange*) native.ToPointer());
6363
}
6464

65-
CppSharp::Parser::SourceRange::SourceRange(::CppSharp::CppParser::SourceRange* native, bool ownNativeInstance)
65+
CppSharp::Parser::SourceRange::SourceRange(struct ::CppSharp::CppParser::SourceRange* native, bool ownNativeInstance)
6666
: __ownsNativeInstance(ownNativeInstance)
6767
{
6868
NativePtr = native;
6969
}
7070

7171
CppSharp::Parser::SourceRange^ CppSharp::Parser::SourceRange::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance)
7272
{
73-
return gcnew ::CppSharp::Parser::SourceRange((::CppSharp::CppParser::SourceRange*) native.ToPointer(), __ownsNativeInstance);
73+
return gcnew ::CppSharp::Parser::SourceRange((struct ::CppSharp::CppParser::SourceRange*) native.ToPointer(), __ownsNativeInstance);
7474
}
7575

7676
CppSharp::Parser::SourceRange::~SourceRange()
@@ -83,47 +83,47 @@ CppSharp::Parser::SourceRange::SourceRange(CppSharp::Parser::SourceRange^ _0)
8383
__ownsNativeInstance = true;
8484
if (ReferenceEquals(_0, nullptr))
8585
throw gcnew ::System::ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
86-
auto &__arg0 = *(::CppSharp::CppParser::SourceRange*)_0->NativePtr;
87-
NativePtr = new ::CppSharp::CppParser::SourceRange(__arg0);
86+
auto &__arg0 = *(struct ::CppSharp::CppParser::SourceRange*)_0->NativePtr;
87+
NativePtr = new struct ::CppSharp::CppParser::SourceRange(__arg0);
8888
}
8989

9090
CppSharp::Parser::SourceRange::SourceRange()
9191
{
9292
__ownsNativeInstance = true;
93-
NativePtr = new ::CppSharp::CppParser::SourceRange();
93+
NativePtr = new struct ::CppSharp::CppParser::SourceRange();
9494
}
9595

96-
System::IntPtr CppSharp::Parser::SourceRange::__Instance::get()
96+
::System::IntPtr CppSharp::Parser::SourceRange::__Instance::get()
9797
{
98-
return System::IntPtr(NativePtr);
98+
return ::System::IntPtr(NativePtr);
9999
}
100100

101-
void CppSharp::Parser::SourceRange::__Instance::set(System::IntPtr object)
101+
void CppSharp::Parser::SourceRange::__Instance::set(::System::IntPtr object)
102102
{
103-
NativePtr = (::CppSharp::CppParser::SourceRange*)object.ToPointer();
103+
NativePtr = (struct ::CppSharp::CppParser::SourceRange*)object.ToPointer();
104104
}
105105

106106
CppSharp::Parser::SourceLocation CppSharp::Parser::SourceRange::BeginLoc::get()
107107
{
108-
return ::CppSharp::Parser::SourceLocation((::CppSharp::CppParser::SourceLocation*)&((::CppSharp::CppParser::SourceRange*)NativePtr)->beginLoc);
108+
return ::CppSharp::Parser::SourceLocation((struct ::CppSharp::CppParser::SourceLocation*)&NativePtr->beginLoc);
109109
}
110110

111111
void CppSharp::Parser::SourceRange::BeginLoc::set(CppSharp::Parser::SourceLocation value)
112112
{
113113
auto _marshal0 = ::CppSharp::CppParser::SourceLocation();
114114
_marshal0.ID = value.ID;
115-
((::CppSharp::CppParser::SourceRange*)NativePtr)->beginLoc = _marshal0;
115+
((struct ::CppSharp::CppParser::SourceRange*)NativePtr)->beginLoc = _marshal0;
116116
}
117117

118118
CppSharp::Parser::SourceLocation CppSharp::Parser::SourceRange::EndLoc::get()
119119
{
120-
return ::CppSharp::Parser::SourceLocation((::CppSharp::CppParser::SourceLocation*)&((::CppSharp::CppParser::SourceRange*)NativePtr)->endLoc);
120+
return ::CppSharp::Parser::SourceLocation((struct ::CppSharp::CppParser::SourceLocation*)&NativePtr->endLoc);
121121
}
122122

123123
void CppSharp::Parser::SourceRange::EndLoc::set(CppSharp::Parser::SourceLocation value)
124124
{
125125
auto _marshal0 = ::CppSharp::CppParser::SourceLocation();
126126
_marshal0.ID = value.ID;
127-
((::CppSharp::CppParser::SourceRange*)NativePtr)->endLoc = _marshal0;
127+
((struct ::CppSharp::CppParser::SourceRange*)NativePtr)->endLoc = _marshal0;
128128
}
129129

src/CppParser/Bindings/CLI/Sources.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ namespace CppSharp
2626
{
2727
public:
2828

29-
SourceLocation(::CppSharp::CppParser::SourceLocation* native);
30-
SourceLocation(::CppSharp::CppParser::SourceLocation* native, bool ownNativeInstance);
29+
SourceLocation(struct ::CppSharp::CppParser::SourceLocation* native);
30+
SourceLocation(struct ::CppSharp::CppParser::SourceLocation* native, bool ownNativeInstance);
3131
static SourceLocation^ __CreateInstance(::System::IntPtr native);
3232
static SourceLocation^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
3333
SourceLocation(unsigned int ID);
@@ -49,15 +49,15 @@ namespace CppSharp
4949
{
5050
public:
5151

52-
property ::CppSharp::CppParser::SourceRange* NativePtr;
53-
property System::IntPtr __Instance
52+
property struct ::CppSharp::CppParser::SourceRange* NativePtr;
53+
property ::System::IntPtr __Instance
5454
{
55-
virtual System::IntPtr get();
56-
virtual void set(System::IntPtr instance);
55+
virtual ::System::IntPtr get();
56+
virtual void set(::System::IntPtr instance);
5757
}
5858

59-
SourceRange(::CppSharp::CppParser::SourceRange* native);
60-
SourceRange(::CppSharp::CppParser::SourceRange* native, bool ownNativeInstance);
59+
SourceRange(struct ::CppSharp::CppParser::SourceRange* native);
60+
SourceRange(struct ::CppSharp::CppParser::SourceRange* native, bool ownNativeInstance);
6161
static SourceRange^ __CreateInstance(::System::IntPtr native);
6262
static SourceRange^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
6363
SourceRange(CppSharp::Parser::SourceRange^ _0);

0 commit comments

Comments
 (0)