mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
Define different struct size for APValue on Windows (thanks @Sahnvour)
This commit is contained in:
parent
247e567422
commit
0e38f7215b
@ -1,3 +1,5 @@
|
||||
const builtin = @import("builtin");
|
||||
|
||||
pub const struct_ZigClangAPSInt = @OpaqueType();
|
||||
pub const struct_ZigClangAPFloat = @OpaqueType();
|
||||
pub const struct_ZigClangASTContext = @OpaqueType();
|
||||
@ -938,7 +940,7 @@ pub const struct_ZigClangExprEvalResult = extern struct {
|
||||
|
||||
pub const struct_ZigClangAPValue = extern struct {
|
||||
Kind: ZigClangAPValue_ValueKind,
|
||||
Data: [68]u8, // TODO: is there a way to statically assert that this matches the .h?
|
||||
Data: if (builtin.os == .windows) [52]u8 else [68]u8,
|
||||
};
|
||||
|
||||
pub const ZigClangAPValue_ValueKind = extern enum {
|
||||
|
||||
@ -47,7 +47,12 @@ enum ZigClangAPValue_ValueKind {
|
||||
|
||||
struct ZigClangAPValue {
|
||||
enum ZigClangAPValue_ValueKind Kind;
|
||||
char Data[68]; // experimentally-derived size of clang::APValue::DataType
|
||||
// experimentally-derived size of clang::APValue::DataType
|
||||
#ifdef _WIN32
|
||||
char Data[52];
|
||||
#else
|
||||
char Data[68];
|
||||
#endif
|
||||
};
|
||||
|
||||
struct ZigClangExprEvalResult {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user