Skip to content

Commit

Permalink
Rename fetchAddress to referenceType (#754)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShubhamChaturvedi7 authored Dec 23, 2024
1 parent 630096f commit fae37dd
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ void generateNativeResourceWrapper(
""
);
boolean deReferenceRequired = true;
boolean fetchAddress = false;
boolean referenceType = false;
if (outputShape.hasTrait(PositionalTrait.class)) {
final MemberShape postionalMemShape = outputShape
.getAllMembers()
Expand All @@ -1151,7 +1151,7 @@ void generateNativeResourceWrapper(
);
// If shape is pointer type, we need to fetch its address
// because conversion function will have pointer as input
fetchAddress =
referenceType =
context
.symbolProvider()
.toSymbol(outputShape)
Expand All @@ -1176,7 +1176,7 @@ void generateNativeResourceWrapper(
returnResponse =
"%s(%snative_response)".formatted(
toDafnyConvMethodNameForOutput,
deReferenceRequired ? "*" : (fetchAddress ? "&" : "")
deReferenceRequired ? "*" : (referenceType ? "&" : "")
);
}
writer.write(
Expand Down

0 comments on commit fae37dd

Please sign in to comment.