diff options
author | Joshua Haberman <joshua@reverberate.org> | 2009-11-26 22:38:42 -0800 |
---|---|---|
committer | Joshua Haberman <joshua@reverberate.org> | 2009-11-26 22:43:47 -0800 |
commit | 6191fe3ae2fee99948da11d9834fe6425cf32037 (patch) | |
tree | 4a9533d184eed7f015a6b2b2fb1ff9b44c9d36da /src/upb_msg.h | |
parent | cb6c34275fab1d91f45061220694e361b7efe04c (diff) |
Reference-count upb_msgdef and upb_enumdef.
The context owns a reference on each def, defs own references
on defs they reference, and msgs own refs on their def.
Diffstat (limited to 'src/upb_msg.h')
-rw-r--r-- | src/upb_msg.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/upb_msg.h b/src/upb_msg.h index 4ca1e2a..42f9bb2 100644 --- a/src/upb_msg.h +++ b/src/upb_msg.h @@ -59,6 +59,7 @@ INLINE struct upb_msg *upb_msg_new(struct upb_msgdef *md) { memset(msg, 0, size); upb_mmhead_init(&msg->mmhead); msg->def = md; + upb_msgdef_ref(md); return msg; } |