summaryrefslogtreecommitdiffstats
path: root/misc/bstr.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:13:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:13:14 +0000
commit60e8a3d404f0640fa5a3f834eae54b4f1fb9127d (patch)
tree1da89a218d0ecf010c67a87cb2f625c4cb18e7d7 /misc/bstr.h
parentAdding upstream version 0.37.0. (diff)
downloadmpv-upstream/0.38.0.tar.xz
mpv-upstream/0.38.0.zip
Adding upstream version 0.38.0.upstream/0.38.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'misc/bstr.h')
-rw-r--r--misc/bstr.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/misc/bstr.h b/misc/bstr.h
index dc8ad40..aaae7d6 100644
--- a/misc/bstr.h
+++ b/misc/bstr.h
@@ -56,6 +56,8 @@ static inline struct bstr bstrdup(void *talloc_ctx, struct bstr str)
return r;
}
+#define bstr0_lit(s) {(unsigned char *)(s), sizeof("" s) - 1}
+
static inline struct bstr bstr0(const char *s)
{
return (struct bstr){(unsigned char *)s, s ? strlen(s) : 0};
@@ -223,6 +225,12 @@ static inline bool bstr_eatend0(struct bstr *s, const char *prefix)
return bstr_eatend(s, bstr0(prefix));
}
+#ifdef _WIN32
+
+int bstr_to_wchar(void *talloc_ctx, struct bstr s, wchar_t **ret);
+
+#endif
+
// create a pair (not single value!) for "%.*s" printf syntax
#define BSTR_P(bstr) (int)((bstr).len), ((bstr).start ? (char*)(bstr).start : "")