summaryrefslogtreecommitdiff
path: root/core/upb_string.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/upb_string.c')
-rw-r--r--core/upb_string.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/core/upb_string.c b/core/upb_string.c
index 297583b..30ed88f 100644
--- a/core/upb_string.c
+++ b/core/upb_string.c
@@ -48,30 +48,12 @@ uint32_t upb_string_size(upb_string *str) {
#endif
}
-static void upb_string_release(upb_string *str) {
- if(str->src) {
- upb_string_unref(str->src);
- str->src = NULL;
- }
-}
-
void _upb_string_free(upb_string *str) {
free(str->cached_mem);
- upb_string_release(str);
+ _upb_string_release(str);
free(str);
}
-void upb_string_recycle(upb_string **_str) {
- upb_string *str = *_str;
- if(str && upb_atomic_only(&str->refcount)) {
- str->ptr = NULL;
- upb_string_release(str);
- } else {
- upb_string_unref(str);
- *_str = upb_string_new();
- }
-}
-
char *upb_string_getrwbuf(upb_string *str, upb_strlen_t len) {
// assert(str->ptr == NULL);
upb_strlen_t size = upb_string_size(str);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback