From 04c02796bd371e65f81a92b853658b8fbadb7ad5 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 9 May 2015 15:26:47 +0200 Subject: path: make mp_path_join accept normal C strings Instead of bstr. Most callers of this function do not need bstr. The bstr version of this function is now mp_path_join_bstr(). --- player/lua.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'player/lua.c') diff --git a/player/lua.c b/player/lua.c index 8cfcd059a4..2e00f79dda 100644 --- a/player/lua.c +++ b/player/lua.c @@ -280,7 +280,7 @@ static void set_path(lua_State *L) char **luadir = mp_find_all_config_files(tmp, get_mpctx(L)->global, "scripts"); for (int i = 0; luadir && luadir[i]; i++) { newpath = talloc_asprintf_append(newpath, ";%s", - mp_path_join(tmp, bstr0(luadir[i]), bstr0("?.lua"))); + mp_path_join(tmp, luadir[i], "?.lua")); } lua_pushstring(L, newpath); // package path newpath @@ -1142,7 +1142,7 @@ static int script_join_path(lua_State *L) { const char *p1 = luaL_checkstring(L, 1); const char *p2 = luaL_checkstring(L, 2); - char *r = mp_path_join(NULL, bstr0(p1), bstr0(p2)); + char *r = mp_path_join(NULL, p1, p2); lua_pushstring(L, r); talloc_free(r); return 1; -- cgit v1.2.3