Minor improvements

This commit is contained in:
2026-08-10 14:58:52 +02:00
parent 68d2c41539
commit b57c837157
2 changed files with 4 additions and 1 deletions
+2
View File
@@ -33,4 +33,6 @@ namespace THelpers
};
}
// Utility to execute code from lambda on scope exit (no matter the place with scope arguments capture)
// Usage: SCOPE_EXIT{ DoSomething(); };
#define SCOPE_EXIT const auto CONCAT_MACROS(__scopeExit, __LINE__) = THelpers::ScopeExitInternal() * [&]()
@@ -116,7 +116,8 @@ namespace Flax.Build.Bindings
else
{
// Pass as pointer to local variable converted for managed runtime
if (paramType.IsPtr)
var paramApiType = FindApiTypeInfo(buildData, paramType, caller);
if (paramType.IsPtr && (paramApiType == null || !paramApiType.IsScriptingObject))
result = string.Format(nativeToManaged, '*' + paramName);
contents.Append($" auto __param_{paramName} = {result};").AppendLine();
result = $"&__param_{paramName}";