|
@@ -314,6 +314,8 @@
|
|
|
|
|
|
var
|
|
var
|
|
emptyintf: ptruint; public name 'FPC_EMPTYINTF';
|
|
emptyintf: ptruint; public name 'FPC_EMPTYINTF';
|
|
|
|
+ const
|
|
|
|
+ emptyintfptr: pinterfacetable = {$ifdef ver2_6}@emptyintf{$else}pinterfacetable(1){$endif};
|
|
|
|
|
|
procedure InitInterfacePointers(objclass: tclass;instance : pointer);
|
|
procedure InitInterfacePointers(objclass: tclass;instance : pointer);
|
|
|
|
|
|
@@ -324,7 +326,7 @@
|
|
Res: pinterfaceentry;
|
|
Res: pinterfaceentry;
|
|
begin
|
|
begin
|
|
ovmt := PVmt(objclass);
|
|
ovmt := PVmt(objclass);
|
|
- while assigned(ovmt) and (ovmt^.vIntfTable <> @emptyintf) do
|
|
|
|
|
|
+ while assigned(ovmt) and (ovmt^.vIntfTable <> emptyintfptr) do
|
|
begin
|
|
begin
|
|
intftable:=ovmt^.vIntfTable;
|
|
intftable:=ovmt^.vIntfTable;
|
|
if assigned(intftable) then
|
|
if assigned(intftable) then
|
|
@@ -351,7 +353,7 @@
|
|
{ insert VMT pointer into the new created memory area }
|
|
{ insert VMT pointer into the new created memory area }
|
|
{ (in class methods self contains the VMT!) }
|
|
{ (in class methods self contains the VMT!) }
|
|
ppointer(instance)^:=pointer(self);
|
|
ppointer(instance)^:=pointer(self);
|
|
- if PVmt(self)^.vIntfTable <> @emptyintf then
|
|
|
|
|
|
+ if PVmt(self)^.vIntfTable <> emptyintfptr then
|
|
InitInterfacePointers(self,instance);
|
|
InitInterfacePointers(self,instance);
|
|
InitInstance:=TObject(Instance);
|
|
InitInstance:=TObject(Instance);
|
|
end;
|
|
end;
|
|
@@ -862,7 +864,7 @@
|
|
ovmt: PVmt;
|
|
ovmt: PVmt;
|
|
begin
|
|
begin
|
|
ovmt := PVmt(Self);
|
|
ovmt := PVmt(Self);
|
|
- while Assigned(ovmt) and (ovmt^.vIntfTable <> @emptyintf) do
|
|
|
|
|
|
+ while Assigned(ovmt) and (ovmt^.vIntfTable <> emptyintfptr) do
|
|
begin
|
|
begin
|
|
intftable:=ovmt^.vIntfTable;
|
|
intftable:=ovmt^.vIntfTable;
|
|
if assigned(intftable) then
|
|
if assigned(intftable) then
|
|
@@ -886,7 +888,7 @@
|
|
ovmt: PVmt;
|
|
ovmt: PVmt;
|
|
begin
|
|
begin
|
|
ovmt := PVmt(Self);
|
|
ovmt := PVmt(Self);
|
|
- while Assigned(ovmt) and (ovmt^.vIntfTable <> @emptyintf) do
|
|
|
|
|
|
+ while Assigned(ovmt) and (ovmt^.vIntfTable <> emptyintfptr) do
|
|
begin
|
|
begin
|
|
intftable:=ovmt^.vIntfTable;
|
|
intftable:=ovmt^.vIntfTable;
|
|
if assigned(intftable) then
|
|
if assigned(intftable) then
|