Browse Source

* pas2jni: Properly handle enums with inline elements.

git-svn-id: trunk@29160 -
yury 10 năm trước cách đây
mục cha
commit
830e3ceb0d
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      utils/pas2jni/ppuparser.pas

+ 3 - 1
utils/pas2jni/ppuparser.pas

@@ -424,7 +424,7 @@ var
         else
           continue;
 
-        if CurObjName = '' then begin
+        if (CurObjName = '') and (d.DefType <> dtEnum) then begin
           d.Free;
           continue;
         end;
@@ -530,6 +530,8 @@ var
               Base:=it.Integers['Base'];
               ElMax:=it.Integers['Max'];
               ElType:=TTypeDef(_GetRef(it.Objects['ElType'], TTypeDef));
+              if (ElType <> nil) and (ElType.Name = '') then
+                ElType.Name:=CurObjName + 'El';
             end;
           dtConst:
             with TConstDef(d) do begin