summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/common.c13
-rw-r--r--common/common.h2
2 files changed, 2 insertions, 13 deletions
diff --git a/common/common.c b/common/common.c
index 741dc236b9..e9cd70cf41 100644
--- a/common/common.c
+++ b/common/common.c
@@ -105,17 +105,8 @@ bool mp_rect_intersection(struct mp_rect *rc, const struct mp_rect *rc2)
}
// Encode the unicode codepoint as UTF-8, and append to the end of the
-// talloc'ed buffer.
-char *mp_append_utf8_buffer(char *buffer, uint32_t codepoint)
-{
- char data[8];
- uint8_t tmp;
- char *output = data;
- PUT_UTF8(codepoint, tmp, *output++ = tmp;);
- return talloc_strndup_append_buffer(buffer, data, output - data);
-}
-
-// Like mp_append_utf8_buffer, but use bstr_xappend().
+// talloc'ed buffer. All guarantees bstr_xappend() give applies, such as
+// implicit \0-termination for convenience.
void mp_append_utf8_bstr(void *talloc_ctx, struct bstr *buf, uint32_t codepoint)
{
char data[8];
diff --git a/common/common.h b/common/common.h
index 7ae18d1b6f..afb0f6ceda 100644
--- a/common/common.h
+++ b/common/common.h
@@ -73,8 +73,6 @@ struct mp_rect {
void mp_rect_union(struct mp_rect *rc, const struct mp_rect *src);
bool mp_rect_intersection(struct mp_rect *rc, const struct mp_rect *rc2);
-char *mp_append_utf8_buffer(char *buffer, uint32_t codepoint);
-
struct bstr;
void mp_append_utf8_bstr(void *talloc_ctx, struct bstr *buf, uint32_t codepoint);