Open marler8997 opened 3 years ago
if (getOverride("SOME_STRUCT")) |o| o else struct {
getOverride("SOME_STRUCT") orelse struct {....
Note also that overrides
would follow the same structures you have, e.g.
pub const zigwin32_config = struct {
pub const overrides = struct {
pub const ai = struct {
pub const FOO = struct{....}
}
pub const otherthing = struct {
pub const BAR = struct{....}
}
pub const core = struct {
pub const HANDLE = std.os.windows.HANDLE;
}
};
};
daurnimator asked if zigwin32 had the ability to override types. He suggested the root module could do something like this:
To support this, whenever I generate a type, instead of this:
I could do something like this:
Where
getOverride
would look something like:Note that this mechanism could be leveraged to help with a solution to the
std
interop problem.