summaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2011-08-27 20:36:34 -0700
committerJoshua Haberman <jhaberman@gmail.com>2011-08-27 20:36:34 -0700
commit521ac7a89adb97bcd1781b4131333554ccd4de87 (patch)
tree7638bf1ecc0af6d123efb87c46f88f661130952e /benchmarks
parent48fedab345674000dd2f8dd4d8356ee995d9263e (diff)
Refined upb_status.
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/parsestream.upb.c6
-rw-r--r--benchmarks/parsetoproto2.upb.cc9
-rw-r--r--benchmarks/parsetostruct.upb.c6
3 files changed, 11 insertions, 10 deletions
diff --git a/benchmarks/parsestream.upb.c b/benchmarks/parsestream.upb.c
index 80f9444..e5f6246 100644
--- a/benchmarks/parsestream.upb.c
+++ b/benchmarks/parsestream.upb.c
@@ -33,7 +33,8 @@ static bool initialize()
upb_symtab *s = upb_symtab_new();
upb_read_descriptorfile(s, MESSAGE_DESCRIPTOR_FILE, &status);
if(!upb_ok(&status)) {
- upb_status_print(&status, stderr);
+ fprintf(stderr, "Error reading descriptor: %s\n",
+ upb_status_getstr(&status));
return false;
}
@@ -82,7 +83,6 @@ static size_t run(int i)
return input_len;
err:
- fprintf(stderr, "Decode error: ");
- upb_status_print(&status, stderr);
+ fprintf(stderr, "Decode error: %s", upb_status_getstr(&status));
return 0;
}
diff --git a/benchmarks/parsetoproto2.upb.cc b/benchmarks/parsetoproto2.upb.cc
index 386eeaa..2e78c1e 100644
--- a/benchmarks/parsetoproto2.upb.cc
+++ b/benchmarks/parsetoproto2.upb.cc
@@ -228,7 +228,8 @@ static bool initialize()
upb_def **defs = upb_load_descriptor(data, len, &n, &status);
free(data);
if(!upb_ok(&status)) {
- upb_status_print(&status, stderr);
+ fprintf(stderr, "Error reading descriptor: %s\n",
+ upb_status_getstr(&status));
return false;
}
@@ -249,7 +250,8 @@ static bool initialize()
upb_symtab_add(s, defs, n, &status);
if(!upb_ok(&status)) {
- upb_status_print(&status, stderr);
+ fprintf(stderr, "Error reading adding to symtab: %s\n",
+ upb_status_getstr(&status));
return false;
}
for(int i = 0; i < n; i++) upb_def_unref(defs[i]);
@@ -301,7 +303,6 @@ static size_t run(int i)
return len;
err:
- fprintf(stderr, "Decode error: ");
- upb_status_print(&status, stderr);
+ fprintf(stderr, "Decode error: %s", upb_status_getstr(&status));
return 0;
}
diff --git a/benchmarks/parsetostruct.upb.c b/benchmarks/parsetostruct.upb.c
index f44b650..d360f05 100644
--- a/benchmarks/parsetostruct.upb.c
+++ b/benchmarks/parsetostruct.upb.c
@@ -20,7 +20,8 @@ static bool initialize()
upb_symtab *s = upb_symtab_new();
upb_read_descriptorfile(s, MESSAGE_DESCRIPTOR_FILE, &status);
if(!upb_ok(&status)) {
- upb_status_print(&status, stderr);
+ fprintf(stderr, "Error reading descriptor: %s\n",
+ upb_status_getstr(&status));
return false;
}
@@ -76,7 +77,6 @@ static size_t run(int i)
return len;
err:
- fprintf(stderr, "Decode error: ");
- upb_status_print(&status, stderr);
+ fprintf(stderr, "Decode error: %s", upb_status_getstr(&status));
return 0;
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback