-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
auto_mutability
doesn't take structs into account
#490
Comments
Could you share the C example code? |
typedef struct WGPUChainedStruct {
struct WGPUChainedStruct const * next;
WGPUSType sType;
} WGPUChainedStruct WGPU_STRUCTURE_ATTRIBUTE;
typedef struct WGPUBufferDescriptor {
WGPUChainedStruct const * nextInChain;
WGPU_NULLABLE char const * label;
WGPUBufferUsageFlags usage;
uint64_t size;
WGPUBool mappedAtCreation;
} WGPUBufferDescriptor WGPU_STRUCTURE_ATTRIBUTE; |
@Gnimuc I believe we've to edit mutability.jl for |
Clang.jl/src/generator/passes.jl Lines 770 to 791 in 5a1cc29
This is the current rule which is used to workaround the following case: Lines 118 to 125 in 5a1cc29
You can add more reasonable rules to |
wait. does it only happen to |
Clang.jl/src/generator/passes.jl Line 819 in 5a1cc29
This actually do check those |
I think we need to add new rules for non-function-proto types. |
There are a few structs which take a pointer to another struct as one of its fields. For example, in a certain generated code:
In such cases, wouldn't it make more sense if
B
was mutable, and forauto_mutability
to makeB
mutable as well?The text was updated successfully, but these errors were encountered: