Skip to content

Commit cda8331

Browse files
committed
set Enum type, otherwise it defaults to Int32
which will not fit in all cases
1 parent d185104 commit cda8331

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wrap_c.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ function wrap(context::WrapContext, expr_buf::OrderedDict, cursor::EnumDecl; use
379379
push!(name_values, (cur_sym, Int(value(enumitem))))
380380
end
381381

382-
enum_expr = :(@enum($enumname))
382+
enum_expr = :(@enum($enumname::$_int))
383383
expr_buf[enumname] = ExprUnit(enum_expr)
384384
for (name, value) in name_values
385385
# expr_buf[name] = enum_expr # TODO

0 commit comments

Comments
 (0)