diff options
author | Josh Haberman <jhaberman@gmail.com> | 2016-09-09 18:54:34 -0700 |
---|---|---|
committer | Josh Haberman <jhaberman@gmail.com> | 2016-09-09 18:54:34 -0700 |
commit | af79bfb919694a58852685f36a46ff32e401b58c (patch) | |
tree | f4da3853a6341d9bafee0be69f6aa64395cfe230 /tests | |
parent | b176b976a5f941a73b2247b3ae8473bf1c0c0fa7 (diff) |
Some refcounting fixes.
Clearly this stuff is too complex overall.
The plan is to move away from this and more towards
pools, like proto2 uses.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_def.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test_def.c b/tests/test_def.c index e9ca438..669aed0 100644 --- a/tests/test_def.c +++ b/tests/test_def.c @@ -53,9 +53,11 @@ static upb_symtab *load_test_proto(void *owner) { files_ptr = files; while (*files_ptr) { - bool ok = upb_symtab_addfile(s, *files, &status); + ASSERT(!upb_filedef_isfrozen(*files_ptr)); + bool ok = upb_symtab_addfile(s, *files_ptr, &status); ASSERT(ok); - upb_filedef_unref(*files, &files); + ASSERT(upb_filedef_isfrozen(*files_ptr)); + upb_filedef_unref(*files_ptr, &files); files_ptr++; } |