Skip to content

Commit 79460d4

Browse files
committed
Remove uses of deprecated callconv aliases
1 parent 05937b3 commit 79460d4

File tree

251 files changed

+826
-822
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

251 files changed

+826
-822
lines changed

doc/langref/export_builtin.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ comptime {
22
@export(&internalName, .{ .name = "foo", .linkage = .strong });
33
}
44

5-
fn internalName() callconv(.C) void {}
5+
fn internalName() callconv(.c) void {}
66

77
// obj

doc/langref/test_defining_variadic_function.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const std = @import("std");
22
const testing = std.testing;
33
const builtin = @import("builtin");
44

5-
fn add(count: c_int, ...) callconv(.C) c_int {
5+
fn add(count: c_int, ...) callconv(.c) c_int {
66
var ap = @cVaStart();
77
defer @cVaEnd(&ap);
88
var i: usize = 0;

doc/langref/test_functions.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fn abort() noreturn {
3535

3636
// The naked calling convention makes a function not have any function prologue or epilogue.
3737
// This can be useful when integrating with assembly.
38-
fn _start() callconv(.Naked) noreturn {
38+
fn _start() callconv(.naked) noreturn {
3939
abort();
4040
}
4141

doc/langref/test_opaque.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const Derp = opaque {};
22
const Wat = opaque {};
33

44
extern fn bar(d: *Derp) void;
5-
fn foo(w: *Wat) callconv(.C) void {
5+
fn foo(w: *Wat) callconv(.c) void {
66
bar(w);
77
}
88

lib/c.zig

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ pub fn panic(msg: []const u8, error_return_trace: ?*std.builtin.StackTrace, _: ?
5454
}
5555

5656
extern fn main(argc: c_int, argv: [*:null]?[*:0]u8) c_int;
57-
fn wasm_start() callconv(.C) void {
57+
fn wasm_start() callconv(.c) void {
5858
_ = main(0, undefined);
5959
}
6060

61-
fn strcpy(dest: [*:0]u8, src: [*:0]const u8) callconv(.C) [*:0]u8 {
61+
fn strcpy(dest: [*:0]u8, src: [*:0]const u8) callconv(.c) [*:0]u8 {
6262
var i: usize = 0;
6363
while (src[i] != 0) : (i += 1) {
6464
dest[i] = src[i];
@@ -76,7 +76,7 @@ test "strcpy" {
7676
try std.testing.expectEqualSlices(u8, "foobarbaz", std.mem.sliceTo(&s1, 0));
7777
}
7878

79-
fn strncpy(dest: [*:0]u8, src: [*:0]const u8, n: usize) callconv(.C) [*:0]u8 {
79+
fn strncpy(dest: [*:0]u8, src: [*:0]const u8, n: usize) callconv(.c) [*:0]u8 {
8080
var i: usize = 0;
8181
while (i < n and src[i] != 0) : (i += 1) {
8282
dest[i] = src[i];
@@ -96,7 +96,7 @@ test "strncpy" {
9696
try std.testing.expectEqualSlices(u8, "foobarbaz", std.mem.sliceTo(&s1, 0));
9797
}
9898

99-
fn strcat(dest: [*:0]u8, src: [*:0]const u8) callconv(.C) [*:0]u8 {
99+
fn strcat(dest: [*:0]u8, src: [*:0]const u8) callconv(.c) [*:0]u8 {
100100
var dest_end: usize = 0;
101101
while (dest[dest_end] != 0) : (dest_end += 1) {}
102102

@@ -119,7 +119,7 @@ test "strcat" {
119119
try std.testing.expectEqualSlices(u8, "foobarbaz", std.mem.sliceTo(&s1, 0));
120120
}
121121

122-
fn strncat(dest: [*:0]u8, src: [*:0]const u8, avail: usize) callconv(.C) [*:0]u8 {
122+
fn strncat(dest: [*:0]u8, src: [*:0]const u8, avail: usize) callconv(.c) [*:0]u8 {
123123
var dest_end: usize = 0;
124124
while (dest[dest_end] != 0) : (dest_end += 1) {}
125125

@@ -142,19 +142,19 @@ test "strncat" {
142142
try std.testing.expectEqualSlices(u8, "foobarbaz", std.mem.sliceTo(&s1, 0));
143143
}
144144

145-
fn strcmp(s1: [*:0]const u8, s2: [*:0]const u8) callconv(.C) c_int {
145+
fn strcmp(s1: [*:0]const u8, s2: [*:0]const u8) callconv(.c) c_int {
146146
return switch (std.mem.orderZ(u8, s1, s2)) {
147147
.lt => -1,
148148
.eq => 0,
149149
.gt => 1,
150150
};
151151
}
152152

153-
fn strlen(s: [*:0]const u8) callconv(.C) usize {
153+
fn strlen(s: [*:0]const u8) callconv(.c) usize {
154154
return std.mem.len(s);
155155
}
156156

157-
fn strncmp(_l: [*:0]const u8, _r: [*:0]const u8, _n: usize) callconv(.C) c_int {
157+
fn strncmp(_l: [*:0]const u8, _r: [*:0]const u8, _n: usize) callconv(.c) c_int {
158158
if (_n == 0) return 0;
159159
var l = _l;
160160
var r = _r;
@@ -167,7 +167,7 @@ fn strncmp(_l: [*:0]const u8, _r: [*:0]const u8, _n: usize) callconv(.C) c_int {
167167
return @as(c_int, l[0]) - @as(c_int, r[0]);
168168
}
169169

170-
fn strerror(errnum: c_int) callconv(.C) [*:0]const u8 {
170+
fn strerror(errnum: c_int) callconv(.c) [*:0]const u8 {
171171
_ = errnum;
172172
return "TODO strerror implementation";
173173
}

lib/compiler/test_runner.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ var is_fuzz_test: bool = undefined;
350350
extern fn fuzzer_set_name(name_ptr: [*]const u8, name_len: usize) void;
351351
extern fn fuzzer_init(cache_dir: FuzzerSlice) void;
352352
extern fn fuzzer_init_corpus_elem(input_ptr: [*]const u8, input_len: usize) void;
353-
extern fn fuzzer_start(testOne: *const fn ([*]const u8, usize) callconv(.C) void) void;
353+
extern fn fuzzer_start(testOne: *const fn ([*]const u8, usize) callconv(.c) void) void;
354354
extern fn fuzzer_coverage_id() u64;
355355

356356
pub fn fuzz(
@@ -382,7 +382,7 @@ pub fn fuzz(
382382
const global = struct {
383383
var ctx: @TypeOf(context) = undefined;
384384

385-
fn fuzzer_one(input_ptr: [*]const u8, input_len: usize) callconv(.C) void {
385+
fn fuzzer_one(input_ptr: [*]const u8, input_len: usize) callconv(.c) void {
386386
@disableInstrumentation();
387387
testing.allocator_instance = .{};
388388
defer if (testing.allocator_instance.deinit() == .leak) std.process.exit(1);

0 commit comments

Comments
 (0)