| author | |
| committer | |
| log | cfaced3f73da2d5fc82f063715d51e06084baee8 |
| tree | a1a5b3d2f51bda2557f14bbe9a90341571444103 |
| parent | 768a9780ca26166b4481c06e87bc6d090be71b64 |
5 files changed, 8 insertions(+), 8 deletions(-)
example/cat/main.zig+3-3| ... | @@ -17,7 +17,7 @@ pub fn main(args: [][]u8) -> %void { | ... | @@ -17,7 +17,7 @@ pub fn main(args: [][]u8) -> %void { |
| 17 | var is: io.InStream = undefined; | 17 | var is: io.InStream = undefined; |
| 18 | is.open(arg) %% |err| { | 18 | is.open(arg) %% |err| { |
| 19 | %%io.stderr.printf("Unable to open file: "); | 19 | %%io.stderr.printf("Unable to open file: "); |
| 20 | %%io.stderr.printf(@errName(err)); | 20 | %%io.stderr.printf(@errorName(err)); |
| 21 | %%io.stderr.printf("\n"); | 21 | %%io.stderr.printf("\n"); |
| 22 | return err; | 22 | return err; |
| 23 | }; | 23 | }; |
| ... | @@ -46,7 +46,7 @@ fn cat_stream(is: io.InStream) -> %void { | ... | @@ -46,7 +46,7 @@ fn cat_stream(is: io.InStream) -> %void { |
| 46 | while (true) { | 46 | while (true) { |
| 47 | const bytes_read = is.read(buf) %% |err| { | 47 | const bytes_read = is.read(buf) %% |err| { |
| 48 | %%io.stderr.printf("Unable to read from stream: "); | 48 | %%io.stderr.printf("Unable to read from stream: "); |
| 49 | %%io.stderr.printf(@errName(err)); | 49 | %%io.stderr.printf(@errorName(err)); |
| 50 | %%io.stderr.printf("\n"); | 50 | %%io.stderr.printf("\n"); |
| 51 | return err; | 51 | return err; |
| 52 | }; | 52 | }; |
| ... | @@ -57,7 +57,7 @@ fn cat_stream(is: io.InStream) -> %void { | ... | @@ -57,7 +57,7 @@ fn cat_stream(is: io.InStream) -> %void { |
| 57 | 57 | ||
| 58 | io.stdout.write(buf[0...bytes_read]) %% |err| { | 58 | io.stdout.write(buf[0...bytes_read]) %% |err| { |
| 59 | %%io.stderr.printf("Unable to write to stdout: "); | 59 | %%io.stderr.printf("Unable to write to stdout: "); |
| 60 | %%io.stderr.printf(@errName(err)); | 60 | %%io.stderr.printf(@errorName(err)); |
| 61 | %%io.stderr.printf("\n"); | 61 | %%io.stderr.printf("\n"); |
| 62 | return err; | 62 | return err; |
| 63 | }; | 63 | }; |
example/guess_number/main.zig+1-1| ... | @@ -19,7 +19,7 @@ pub fn main(args: [][]u8) -> %void { | ... | @@ -19,7 +19,7 @@ pub fn main(args: [][]u8) -> %void { |
| 19 | 19 | ||
| 20 | const line_len = io.stdin.read(line_buf) %% |err| { | 20 | const line_len = io.stdin.read(line_buf) %% |err| { |
| 21 | %%io.stdout.printf("Unable to read from stdin: "); | 21 | %%io.stdout.printf("Unable to read from stdin: "); |
| 22 | %%io.stdout.printf(@errName(err)); | 22 | %%io.stdout.printf(@errorName(err)); |
| 23 | %%io.stdout.printf("\n"); | 23 | %%io.stdout.printf("\n"); |
| 24 | return err; | 24 | return err; |
| 25 | }; | 25 | }; |
src/codegen.cpp+1-1| ... | @@ -4843,7 +4843,7 @@ static void define_builtin_fns(CodeGen *g) { | ... | @@ -4843,7 +4843,7 @@ static void define_builtin_fns(CodeGen *g) { |
| 4843 | create_builtin_fn_with_arg_count(g, BuiltinFnIdClz, "clz", 2); | 4843 | create_builtin_fn_with_arg_count(g, BuiltinFnIdClz, "clz", 2); |
| 4844 | create_builtin_fn_with_arg_count(g, BuiltinFnIdImport, "import", 1); | 4844 | create_builtin_fn_with_arg_count(g, BuiltinFnIdImport, "import", 1); |
| 4845 | create_builtin_fn_with_arg_count(g, BuiltinFnIdCImport, "cImport", 1); | 4845 | create_builtin_fn_with_arg_count(g, BuiltinFnIdCImport, "cImport", 1); |
| 4846 | create_builtin_fn_with_arg_count(g, BuiltinFnIdErrName, "errName", 1); | 4846 | create_builtin_fn_with_arg_count(g, BuiltinFnIdErrName, "errorName", 1); |
| 4847 | create_builtin_fn_with_arg_count(g, BuiltinFnIdEmbedFile, "embedFile", 1); | 4847 | create_builtin_fn_with_arg_count(g, BuiltinFnIdEmbedFile, "embedFile", 1); |
| 4848 | create_builtin_fn_with_arg_count(g, BuiltinFnIdCmpExchange, "cmpxchg", 5); | 4848 | create_builtin_fn_with_arg_count(g, BuiltinFnIdCmpExchange, "cmpxchg", 5); |
| 4849 | create_builtin_fn_with_arg_count(g, BuiltinFnIdFence, "fence", 1); | 4849 | create_builtin_fn_with_arg_count(g, BuiltinFnIdFence, "fence", 1); |
std/mem.zig+1-1| ... | @@ -19,7 +19,7 @@ pub struct Allocator { | ... | @@ -19,7 +19,7 @@ pub struct Allocator { |
| 19 | alloc(self, T, n) %% |err| { | 19 | alloc(self, T, n) %% |err| { |
| 20 | // TODO var args printf | 20 | // TODO var args printf |
| 21 | %%io.stderr.write("allocation failure: "); | 21 | %%io.stderr.write("allocation failure: "); |
| 22 | %%io.stderr.write(@errName(err)); | 22 | %%io.stderr.write(@errorName(err)); |
| 23 | %%io.stderr.printf("\n"); | 23 | %%io.stderr.printf("\n"); |
| 24 | os.abort() | 24 | os.abort() |
| 25 | } | 25 | } |
test/self_hosted.zig+2-2| ... | @@ -766,8 +766,8 @@ error AnError; | ... | @@ -766,8 +766,8 @@ error AnError; |
| 766 | error ALongerErrorName; | 766 | error ALongerErrorName; |
| 767 | #attribute("test") | 767 | #attribute("test") |
| 768 | fn errorNameString() { | 768 | fn errorNameString() { |
| 769 | assert(str.eql(@errName(error.AnError), "AnError")); | 769 | assert(str.eql(@errorName(error.AnError), "AnError")); |
| 770 | assert(str.eql(@errName(error.ALongerErrorName), "ALongerErrorName")); | 770 | assert(str.eql(@errorName(error.ALongerErrorName), "ALongerErrorName")); |
| 771 | } | 771 | } |
| 772 | 772 | ||
| 773 | 773 |