RTL custom interface types as records

This commit is contained in:
Michael Schimmel
2025-12-11 14:31:25 +01:00
parent 18dde168fd
commit 8c60949ec9
+12 -7
View File
@@ -113,15 +113,20 @@ end;
class procedure TRtlTypeRegistry.RegisterType(Info: PTypeInfo);
begin
if FKnownTypes.ContainsKey(Info) then
exit;
EnterAnalysis(Info);
TMonitor.Enter(FKnownTypes);
try
var staticType := AnalyzeType(Info);
FKnownTypes.Add(Info, staticType);
if FKnownTypes.ContainsKey(Info) then
exit;
EnterAnalysis(Info);
try
var staticType := AnalyzeType(Info);
FKnownTypes.Add(Info, staticType);
finally
ExitAnalysis(Info);
end;
finally
ExitAnalysis(Info);
TMonitor.Exit(FKnownTypes);
end;
end;