Skip to content

Commit

Permalink
Yet another enumeration fix...
Browse files Browse the repository at this point in the history
  • Loading branch information
danielperano committed Jan 12, 2024
1 parent fe6e1e3 commit e046acb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/src/main/java/com/myworldvw/buoy/NativeMapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ public MemoryLayout getLayout(FieldDef field){
public MemoryLayout getLayout(Class<?> targetType){
var layout = layouts.get(targetType);
if(layout == null){
if(targetType.isEnum()){
return ValueLayout.JAVA_INT;
}
var structAnnotation = getStructAnnotation(targetType);
var structDef = structs.get(structAnnotation.name());
if(structDef == null){
Expand Down

0 comments on commit e046acb

Please sign in to comment.