diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-09-17 11:22:30 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-09-17 11:22:30 -0400 |
| commit | 9c9eefc841b577f646a54e74c8970e074162b594 (patch) | |
| tree | f746c761e0e5a2f58c009962cd65c17ec2804351 /src/analyze.cpp | |
| parent | dd5b2d1b04197903489f5da9c178e17e61bb55e3 (diff) | |
| download | zig-9c9eefc841b577f646a54e74c8970e074162b594.tar.gz zig-9c9eefc841b577f646a54e74c8970e074162b594.zip | |
allow extern structs to have stdcallcc function pointers
closes #1536
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index 0401c7125f..328eda786c 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -1470,7 +1470,8 @@ static bool type_allowed_in_extern(CodeGen *g, ZigType *type_entry) { case ZigTypeIdArray: return type_allowed_in_extern(g, type_entry->data.array.child_type); case ZigTypeIdFn: - return type_entry->data.fn.fn_type_id.cc == CallingConventionC; + return type_entry->data.fn.fn_type_id.cc == CallingConventionC || + type_entry->data.fn.fn_type_id.cc == CallingConventionStdcall; case ZigTypeIdPointer: if (type_size(g, type_entry) == 0) return false; |
