Skip to content

Commit 62a58e4

Browse files
committed
More robust enum generation for C family languages in C code generator.
1 parent 65d4721 commit 62a58e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Generator/Generators/C/CCodeGenerator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ public override bool VisitEnumDecl(Enumeration @enum)
144144
else
145145
Write($"{enumKind} {enumName}");
146146

147-
if (Options.GeneratorKind == GeneratorKind.CPlusPlus ||
148-
Options.GeneratorKind == GeneratorKind.CLI)
147+
if (!(Options.GeneratorKind == GeneratorKind.C ||
148+
Options.GeneratorKind == GeneratorKind.ObjectiveC))
149149
{
150150
var typeName = CTypePrinter.VisitPrimitiveType(
151151
@enum.BuiltinType.Type, new TypeQualifiers());

0 commit comments

Comments
 (0)