diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2011-09-04 19:29:36 -0700 |
---|---|---|
committer | Joshua Haberman <jhaberman@gmail.com> | 2011-09-04 19:29:36 -0700 |
commit | 621c0cdcb5efc4f7c2382031becded018ef0b62b (patch) | |
tree | d6af78ef0872c9db0f48c99e6c93b8d4c43fa689 /tests/test_decoder.c | |
parent | 8f2758dda2ba12b78ae8f8c7170decc5e88dd28c (diff) |
Const invasion: large parts of upb made const-correct.
Diffstat (limited to 'tests/test_decoder.c')
-rw-r--r-- | tests/test_decoder.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_decoder.c b/tests/test_decoder.c index 3ad9c08..1994501 100644 --- a/tests/test_decoder.c +++ b/tests/test_decoder.c @@ -20,20 +20,20 @@ int main(int argc, char *argv[]) { } upb_status status = UPB_STATUS_INIT; - upb_read_descriptor(symtab, desc, desc_len, &status); + upb_load_descriptor_into_symtab(symtab, desc, desc_len, &status); if (!upb_ok(&status)) { fprintf(stderr, "Error parsing descriptor: %s", upb_status_getstr(&status)); return 1; } free((void*)desc); - upb_def *md = upb_symtab_lookup(symtab, argv[2]); + const upb_def *md = upb_symtab_lookup(symtab, argv[2]); if (!md) { fprintf(stderr, "Descriptor did not contain message: %s\n", argv[2]); return 1; } - upb_msgdef *m = upb_dyncast_msgdef(md); + const upb_msgdef *m = upb_dyncast_msgdef_const(md); if (!m) { fprintf(stderr, "Def was not a msgdef.\n"); return 1; |