From a95ab58e79c50b0927eae2b834d3de20a8effc36 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Sat, 28 Nov 2009 15:38:29 -0800 Subject: Overhaul defs to derive from a common base. --- src/upb_string.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/upb_string.h') diff --git a/src/upb_string.h b/src/upb_string.h index 505ac5b..c1caddc 100644 --- a/src/upb_string.h +++ b/src/upb_string.h @@ -58,6 +58,11 @@ INLINE void upb_string_unref(struct upb_string *str) if(upb_mmhead_unref(&str->mmhead)) upb_string_destroy(str); } +INLINE void upb_string_ref(struct upb_string *str) +{ + upb_mmhead_ref(&str->mmhead); +} + /* Resizes the string to size, reallocating if necessary. Does not preserve * existing data. */ INLINE void upb_string_resize(struct upb_string *str, uint32_t size) -- cgit v1.2.3