-
Notifications
You must be signed in to change notification settings - Fork 83
Closed
Description
Hello,
I have another problem with jnaerator and bridj. There is a snippet of one structure in the header file:
typedef struct perf_event_attr {
...
uint64_t disabled : 1,
inherit : 1,
pinned : 1,
...
exclude_callchain_kernel : 1,
exclude_callchain_user : 1,
__reserved_1 : 41;
...
}
Jnaerator generates the corresponding binding for bridj in a java class:
@Field(6)
@Bits(1)
public long disabled() {
return this.io.getLongField(this, 6);
}
@Field(6)
@Bits(1)
public perf_event_attr disabled(long disabled) {
this.io.setLongField(this, 6, disabled);
return this;
}
@Field(7)
@Bits(1)
public long inherit() {
return this.io.getLongField(this, 7);
}
@Field(7)
@Bits(1)
public perf_event_attr inherit(long inherit) {
this.io.setLongField(this, 7, inherit);
return this;
}
...
The problem appeared when I want to set one of the field. Indeed, if I call one of the setter with a long, it erases also the others and so, I don't have the expected values.
Thanks for your help.
Metadata
Metadata
Assignees
Labels
No labels