mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-23 22:09:45 +02:00
* ppudump: Mark objects with abstract methods in the JSON/XML output.
* pas2jni: Properly handle inherited classes when an ancestor has abstract methods. git-svn-id: trunk@35746 -
This commit is contained in:
parent
9093047a7a
commit
ea61dee00b
@ -3349,7 +3349,10 @@ begin
|
||||
writeln([space,' IID String : ',objdef.IID]);
|
||||
end;
|
||||
|
||||
writeln([space,' Abstract methods : ',getlongint]);
|
||||
l:=getlongint;
|
||||
if l > 0 then
|
||||
objdef.Options:=objdef.Options + [ooAbstractMethods];
|
||||
writeln([space,' Abstract methods : ',l]);
|
||||
|
||||
if tobjecttyp(b)=odt_helper then
|
||||
begin
|
||||
|
@ -256,7 +256,7 @@ type
|
||||
end;
|
||||
|
||||
TPpuObjType = (otUnknown, otClass, otObject, otInterface, otHelper);
|
||||
TPpuObjOption = (ooIsAbstract, ooCopied);
|
||||
TPpuObjOption = (ooIsAbstract, ooCopied, ooAbstractMethods);
|
||||
TPpuObjOptions = set of TPpuObjOption;
|
||||
|
||||
{ TPpuObjectDef }
|
||||
@ -460,7 +460,7 @@ const
|
||||
('', 'class', 'object', 'interface', 'helper');
|
||||
|
||||
ObjOptionNames: array[TPpuObjOption] of string =
|
||||
('abstract','copied');
|
||||
('abstract','copied','abstract_methods');
|
||||
|
||||
PropOptionNames: array[TPpuPropOption] of string =
|
||||
('default');
|
||||
|
@ -411,6 +411,13 @@ var
|
||||
AncestorClass:=TClassDef(_GetRef(it.Get('Ancestor', TJSONObject(nil)), TClassDef));
|
||||
if CType in [ctObject, ctRecord] then
|
||||
Size:=it.Integers['Size'];
|
||||
arr:=it.Get('Options', TJSONArray(nil));
|
||||
if arr <> nil then
|
||||
for j:=0 to arr.Count - 1 do begin
|
||||
s:=arr.Strings[j];
|
||||
if s = 'abstract_methods' then
|
||||
HasAbstractMethods:=True;
|
||||
end;
|
||||
_ReadDefs(d, it, 'Fields');
|
||||
end;
|
||||
dtProc, dtProcType:
|
||||
|
Loading…
Reference in New Issue
Block a user