| author | |
| committer | |
| log | 26dabbf301ce4cd950cd66373dc17f0747c1e813 |
| tree | 712d1971bf81fc0dc1bb5aaf3003ef555d658cdd |
| parent | 192e9a315d92133b27d757f18bd4fd619976b755 |
2 files changed, 5 insertions(+), 1 deletions(-)
lib/zig.h+4| ... | ... | @@ -203,7 +203,11 @@ typedef char bool; |
| 203 | 203 | __pragma(comment(linker, "/alternatename:_" #symbol "=_" #name )) |
| 204 | 204 | #endif /*_M_X64 */ |
| 205 | 205 | #else |
| 206 | #if __APPLE__ | |
| 207 | #define zig_import(sig, symbol, name) zig_extern sig __asm("_" #name); | |
| 208 | #else /* __APPLE__ */ | |
| 206 | 209 | #define zig_import(sig, symbol, name) zig_extern sig __asm(#name); |
| 210 | #endif /* __APPLE__ */ | |
| 207 | 211 | #endif |
| 208 | 212 | |
| 209 | 213 | #define zig_expand_import(sig, symbol, name) zig_import(sig, symbol, name) |
src/codegen/c.zig+1-1| ... | ... | @@ -1978,7 +1978,7 @@ pub const DeclGen = struct { |
| 1978 | 1978 | if (mod.decl_exports.get(decl_index)) |exports| { |
| 1979 | 1979 | try writer.print("{ }", .{fmtIdent(mod.intern_pool.stringToSlice(exports.items[export_index].opts.name))}); |
| 1980 | 1980 | } else if (decl.getExternDecl(mod).unwrap()) |extern_decl_index| { |
| 1981 | try writer.print("{ }", .{fmtIdent(mod.intern_pool.stringToSlice(mod.declPtr(extern_decl_index).name))}); | |
| 1981 | try writer.print("{}", .{mod.declPtr(extern_decl_index).name.fmt(&mod.intern_pool)}); | |
| 1982 | 1982 | } else { |
| 1983 | 1983 | // MSVC has a limit of 4095 character token length limit, and fmtIdent can (worst case), |
| 1984 | 1984 | // expand to 3x the length of its input, but let's cut it off at a much shorter limit. |