authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-09-05 17:03:11-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-09-05 17:03:11-04:00
logcfaced3f73da2d5fc82f063715d51e06084baee8
treea1a5b3d2f51bda2557f14bbe9a90341571444103
parent768a9780ca26166b4481c06e87bc6d090be71b64

rename errName builtin to errorName


5 files changed, 8 insertions(+), 8 deletions(-)

example/cat/main.zig+3-3
......@@ -17,7 +17,7 @@ pub fn main(args: [][]u8) -> %void {
1717 var is: io.InStream = undefined;
1818 is.open(arg) %% |err| {
1919 %%io.stderr.printf("Unable to open file: ");
20 %%io.stderr.printf(@errName(err));
20 %%io.stderr.printf(@errorName(err));
2121 %%io.stderr.printf("\n");
2222 return err;
2323 };
......@@ -46,7 +46,7 @@ fn cat_stream(is: io.InStream) -> %void {
4646 while (true) {
4747 const bytes_read = is.read(buf) %% |err| {
4848 %%io.stderr.printf("Unable to read from stream: ");
49 %%io.stderr.printf(@errName(err));
49 %%io.stderr.printf(@errorName(err));
5050 %%io.stderr.printf("\n");
5151 return err;
5252 };
......@@ -57,7 +57,7 @@ fn cat_stream(is: io.InStream) -> %void {
5757
5858 io.stdout.write(buf[0...bytes_read]) %% |err| {
5959 %%io.stderr.printf("Unable to write to stdout: ");
60 %%io.stderr.printf(@errName(err));
60 %%io.stderr.printf(@errorName(err));
6161 %%io.stderr.printf("\n");
6262 return err;
6363 };
example/guess_number/main.zig+1-1
......@@ -19,7 +19,7 @@ pub fn main(args: [][]u8) -> %void {
1919
2020 const line_len = io.stdin.read(line_buf) %% |err| {
2121 %%io.stdout.printf("Unable to read from stdin: ");
22 %%io.stdout.printf(@errName(err));
22 %%io.stdout.printf(@errorName(err));
2323 %%io.stdout.printf("\n");
2424 return err;
2525 };
src/codegen.cpp+1-1
......@@ -4843,7 +4843,7 @@ static void define_builtin_fns(CodeGen *g) {
48434843 create_builtin_fn_with_arg_count(g, BuiltinFnIdClz, "clz", 2);
48444844 create_builtin_fn_with_arg_count(g, BuiltinFnIdImport, "import", 1);
48454845 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);
48474847 create_builtin_fn_with_arg_count(g, BuiltinFnIdEmbedFile, "embedFile", 1);
48484848 create_builtin_fn_with_arg_count(g, BuiltinFnIdCmpExchange, "cmpxchg", 5);
48494849 create_builtin_fn_with_arg_count(g, BuiltinFnIdFence, "fence", 1);
std/mem.zig+1-1
......@@ -19,7 +19,7 @@ pub struct Allocator {
1919 alloc(self, T, n) %% |err| {
2020 // TODO var args printf
2121 %%io.stderr.write("allocation failure: ");
22 %%io.stderr.write(@errName(err));
22 %%io.stderr.write(@errorName(err));
2323 %%io.stderr.printf("\n");
2424 os.abort()
2525 }
test/self_hosted.zig+2-2
......@@ -766,8 +766,8 @@ error AnError;
766766error ALongerErrorName;
767767#attribute("test")
768768fn errorNameString() {
769 assert(str.eql(@errName(error.AnError), "AnError"));
770 assert(str.eql(@errName(error.ALongerErrorName), "ALongerErrorName"));
769 assert(str.eql(@errorName(error.AnError), "AnError"));
770 assert(str.eql(@errorName(error.ALongerErrorName), "ALongerErrorName"));
771771}
772772
773773