diff options
author | wm4 <wm4@mplayer2.org> | 2012-07-28 23:47:42 +0200 |
---|---|---|
committer | wm4 <wm4@mplayer2.org> | 2012-07-28 23:47:42 +0200 |
commit | 08caadb9c0b3c9070f2e5cb7f883f43d6cd5590e (patch) | |
tree | e6a6c3a2042231651ec2f622e312657da900280b /libvo/vo_gl3.c | |
parent | ca0979a5db442ae212c92a34dcbd97101eb5e51c (diff) | |
download | mpv-08caadb9c0b3c9070f2e5cb7f883f43d6cd5590e.tar.bz2 mpv-08caadb9c0b3c9070f2e5cb7f883f43d6cd5590e.tar.xz |
bstr: rename bstr() function to bstr0(), and typedef bstr to struct bstr
Replace all uses of bstr() with bstr0().
Also remove the ridiculous C++ workaround.
Diffstat (limited to 'libvo/vo_gl3.c')
-rw-r--r-- | libvo/vo_gl3.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libvo/vo_gl3.c b/libvo/vo_gl3.c index 6a3f427ef9..4f673e951f 100644 --- a/libvo/vo_gl3.c +++ b/libvo/vo_gl3.c @@ -486,7 +486,7 @@ static char *get_section(void *talloc_ctx, struct bstr source, bool copy = false; while (source.len) { struct bstr line = bstr_strip_linebreaks(bstr_getline(source, &source)); - if (bstr_eatstart(&line, bstr(SECTION_HEADER))) { + if (bstr_eatstart(&line, bstr0(SECTION_HEADER))) { copy = bstrcmp0(line, section) == 0; } else if (copy) { res = talloc_asprintf_append_buffer(res, "%.*s\n", BSTR_P(line)); @@ -631,7 +631,7 @@ static void compile_shaders(struct gl_priv *p) void *tmp = talloc_new(NULL); - struct bstr src = bstr(vo_gl3_shaders); + struct bstr src = bstr0(vo_gl3_shaders); char *vertex_shader = get_section(tmp, src, "vertex_all"); char *shader_prelude = get_section(tmp, src, "prelude"); char *s_video = get_section(tmp, src, "frag_video"); @@ -1970,8 +1970,8 @@ static bool load_icc(struct gl_priv *p, const char *icc_file, mp_msg(MSGT_VO, MSGL_INFO, "[gl] Opening 3D LUT cache in file '%s'.\n", icc_cache); struct bstr cachedata = load_file(p, tmp, icc_cache); - if (bstr_eatstart(&cachedata, bstr(LUT3D_CACHE_HEADER)) - && bstr_eatstart(&cachedata, bstr(cache_info)) + if (bstr_eatstart(&cachedata, bstr0(LUT3D_CACHE_HEADER)) + && bstr_eatstart(&cachedata, bstr0(cache_info)) && bstr_eatstart(&cachedata, iccdata) && cachedata.len == talloc_get_size(output)) { |