不兼容的类型:Delphi XE4中的'PPointerList'和'TPointerList'

1 delphi delphi-7 delphi-xe4

Incompatible types: 'PPointerList' and 'TPointerList'在跟随功能时遇到错误.

function MyFunction: PPointerList;
begin
  result := FList.List;
end;
Run Code Online (Sandbox Code Playgroud)

FList.List返回TPointerList类型.这段代码在Delphi 7代码中工作正常但在Delphi XE4中抛出错误.

PPointerList和TPointerList在System.Classes中声明

在System.Classes中

PPointerList = ^TPointerList;
TPointerList = array of Pointer;
Run Code Online (Sandbox Code Playgroud)

当我将TPointerList转换为PPointerList时,它就像是一样

function MyFunction: PPointerList;
begin
  result := PPointerList(FList.List);
end;
Run Code Online (Sandbox Code Playgroud)

这是正确的解决方案,或者我应该怎么做才能摆脱这个错误.

Ond*_*lle 7

TList已经改变.内部领域FList曾经是PPointerList现在但现在TPointerList.要返回指向它的指针,可以使用:

function MyFunction: PPointerList;
begin
  Result := @FList.List;
end;
Run Code Online (Sandbox Code Playgroud)