RTL custom interface types as records
This commit is contained in:
@@ -113,15 +113,20 @@ end;
|
|||||||
|
|
||||||
class procedure TRtlTypeRegistry.RegisterType(Info: PTypeInfo);
|
class procedure TRtlTypeRegistry.RegisterType(Info: PTypeInfo);
|
||||||
begin
|
begin
|
||||||
if FKnownTypes.ContainsKey(Info) then
|
TMonitor.Enter(FKnownTypes);
|
||||||
exit;
|
|
||||||
|
|
||||||
EnterAnalysis(Info);
|
|
||||||
try
|
try
|
||||||
var staticType := AnalyzeType(Info);
|
if FKnownTypes.ContainsKey(Info) then
|
||||||
FKnownTypes.Add(Info, staticType);
|
exit;
|
||||||
|
|
||||||
|
EnterAnalysis(Info);
|
||||||
|
try
|
||||||
|
var staticType := AnalyzeType(Info);
|
||||||
|
FKnownTypes.Add(Info, staticType);
|
||||||
|
finally
|
||||||
|
ExitAnalysis(Info);
|
||||||
|
end;
|
||||||
finally
|
finally
|
||||||
ExitAnalysis(Info);
|
TMonitor.Exit(FKnownTypes);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user