Skip to content

Commit 5c5e798

Browse files
committed
🐛Fix the cast type.
1 parent c170bfd commit 5c5e798

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Tests/TedToolkit.CppInteropGen.Cpp/FunctionPointer2_C.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ CSHARP_WRAPPER(FunctionPointer2_Create_0(FunctionPointer2*& handle), {
99
handle = new FunctionPointer2();
1010
})
1111

12-
CSHARP_WRAPPER(FunctionPointer2_Test(const FunctionPointer2& handle, const int value, const AbsorbedDose what, const FunctionPointer2 other, int(*method)(int a, int b)), {
12+
CSHARP_WRAPPER(FunctionPointer2_Test(const FunctionPointer2& handle, const int value, AbsorbedDose & what, const FunctionPointer2 other, int(*method)(int a, int b)), {
1313
method(1, 2);
1414
})
1515

src/analyzers/TedToolkit.CppInteropGen.SourceGenerator/ParameterGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public override ArgumentSyntax GenerateArgument()
9696
if (_rawTypeName != _cppTypeName)
9797
{
9898
return Argument(PrefixUnaryExpression(SyntaxKind.PointerIndirectionExpression,
99-
CastExpression(PointerType(IdentifierName(_cppTypeName)),
99+
CastExpression(PointerType(InnerCppType),
100100
PrefixUnaryExpression(SyntaxKind.AddressOfExpression, IdentifierName(name)))));
101101
}
102102

0 commit comments

Comments
 (0)