You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Removed some misguided features and configuration.
* Removed the ability to pass implicit byref by reference. This actually doesn't have the correct semantics from a C++ perspective because the callee assumes it owns the buffer.
* Removed the ability to disable translating const& as pointer to byval. This is less efficient for no good reason.
* Removed being able to disable friendly handling of both situations. If we somehow missed an edge case here people can expose the raw P/Invoke or let us know.
I don't know why I'm writing a detailed commit message for a temporary commit.
Copy file name to clipboardExpand all lines: Biohazrd.CSharp/#Transformations/CreateTrampolinesTransformation.cs
+7-57
Original file line number
Diff line number
Diff line change
@@ -12,32 +12,6 @@ public sealed class CreateTrampolinesTransformation : CSharpTransformationBase
12
12
{
13
13
publicTargetRuntimeTargetRuntime{get;init;}=CSharpGenerationOptions.Default.TargetRuntime;//TODO: This ideally should come from some central context to ensure consistency
// Parameters which are written as being passed by value but are implicitly passed by reference will be adapted to behave the same.
159
+
// Using byref here might seem tempting from a performance standpoint, but doing so would change semantics since the callee assumes it owns the buffer.
160
+
// In theory if the native function receives a const byval we could use a readonly byref, but in partice C++ compilers don't do that even for PODs so we won't either.
161
+
// (const byvals are weird and are not consdiered a good practice in C++ anyway.)
0 commit comments