Skip to content

Commit

Permalink
Add missing enum eltype CXType_UChar
Browse files Browse the repository at this point in the history
Co-Authored-By: Paul Berg <9824244+Pangoraw@users.noreply.github.com>
  • Loading branch information
Gnimuc and Pangoraw committed Jan 22, 2022
1 parent 3db4284 commit db985b4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/cursor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,14 @@ Return the integer value of an enum constant declaration.
"""
function value(c::CLEnumConstantDecl)::Integer
typeKind = kind(getCursorType(c))
if typeKind == CXType_Int || typeKind == CXType_Long || typeKind == CXType_LongLong
if typeKind == CXType_Int ||
typeKind == CXType_Long ||
typeKind == CXType_LongLong
return clang_getEnumConstantDeclValue(c)
elseif typeKind == CXType_UInt ||
typeKind == CXType_ULong ||
typeKind == CXType_ULongLong
typeKind == CXType_ULongLong ||
typeKind == CXType_UChar
return clang_getEnumConstantDeclUnsignedValue(c)
end
return error("Unknown EnumConstantDecl type: ", typeKind, " cursor: ", kind(c))
Expand Down

0 comments on commit db985b4

Please sign in to comment.