Browse Source

* pas2jni: When excluding a class, also exclude all descendant classes.

git-svn-id: trunk@29149 -
yury 10 years ago
parent
commit
3ca38ade60
1 changed files with 8 additions and 0 deletions
  1. 8 0
      utils/pas2jni/ppuparser.pas

+ 8 - 0
utils/pas2jni/ppuparser.pas

@@ -308,6 +308,9 @@ var
         if jt = 'obj' then begin
           if it.Strings['ObjType'] <> 'class' then
             continue;
+          // Exclude class?
+          if FOnCheckItem(AUnitName + '.' + CurObjName) = crExclude then
+            continue;
           d:=TClassDef.Create(CurDef, dtClass);
         end
         else
@@ -443,6 +446,11 @@ var
           dtClass:
             with TClassDef(d) do begin
               AncestorClass:=TClassDef(_GetRef(it.Get('Ancestor', TJSONObject(nil)), TClassDef));
+              if (AncestorClass <> nil) and (AncestorClass.DefType = dtNone) then begin
+                // Ancestor class has been excluded
+                FreeAndNil(d);
+                continue;
+              end;
               _ReadDefs(d, it, 'Fields');
             end;
           dtRecord: