Browse Source

rtl: reuse existing rtticontext, still not Delphi compatible, issue 38812, from Henrique Gottardi Werlang

mattias 4 years ago
parent
commit
0dd3a997c1
1 changed files with 3 additions and 3 deletions
  1. 3 3
      packages/rtl/rtti.pas

+ 3 - 3
packages/rtl/rtti.pas

@@ -1187,13 +1187,13 @@ begin
   Name:=t.Name;
   Name:=t.Name;
   if isModule(t.Module) then
   if isModule(t.Module) then
     Name:=t.Module.Name+'.'+Name;
     Name:=t.Module.Name+'.'+Name;
-  if FPool.hasOwnProperty(Name) then
-    Result:=TRttiType(FPool[Name])
+  if GRttiContext.FPool.hasOwnProperty(Name) then
+    Result:=TRttiType(GRttiContext.FPool[Name])
   else
   else
     begin
     begin
     Result := RttiTypeClass[T.Kind].Create(aTypeInfo);
     Result := RttiTypeClass[T.Kind].Create(aTypeInfo);
 
 
-    FPool[Name]:=Result;
+    GRttiContext.FPool[Name]:=Result;
     end;
     end;
 end;
 end;