Merge branch 'gir2pas' into 'main'

gir2pas: Fixed generation of enumeration types other than bit fields.

See merge request freepascal.org/lazarus/lazarus!206
This commit is contained in:
Maxim Ganetsky 2023-06-17 20:12:12 +00:00
commit c709d94d65
3 changed files with 5 additions and 4 deletions

View File

@ -20,9 +20,10 @@ OPTIONS=\
OBJ=*.o *.or *.ppu *.rsj OBJ=*.o *.or *.ppu *.rsj
gir2pas:gir2pascal.lpr $(SOURCES) gir2pas:gir2pascal.lpr $(SOURCES)
mkdir -p ${UNITS_DIR}
fpc $(OPTIONS) $< -o$@ fpc $(OPTIONS) $< -o$@
clean: clean:
${RM} gir2pas ${UNITS_DIR} $(OBJ) ${RM} -r gir2pas ${UNITS_DIR} $(OBJ)
.PHONY: clean .PHONY: clean

View File

@ -352,6 +352,9 @@ begin
Terminate; Terminate;
end; end;
Include(FOptions, EnumImpl); Include(FOptions, EnumImpl);
if goEnumAsSet in FOptions then begin
Include(FOptions, goEnumAsEnum);
end;
end; end;
VerifyOptions; VerifyOptions;

View File

@ -1172,9 +1172,6 @@ var
i: Integer; i: Integer;
AddedConst: Boolean; AddedConst: Boolean;
begin begin
if goEnumAsSet in FOptions then begin
Include(FOptions, goEnumAsEnum);
end;
HandleEnum(AItem); HandleEnum(AItem);
if goEnumAsSet in FOptions then begin if goEnumAsSet in FOptions then begin
Section := WantEnumTypesSection; Section := WantEnumTypesSection;