diff options
author | wm4 <wm4@nowhere> | 2015-05-09 15:26:47 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-05-09 15:26:47 +0200 |
commit | 04c02796bd371e65f81a92b853658b8fbadb7ad5 (patch) | |
tree | 75b09115e17eedbf06cb3233eb145a5c19f72b58 /player/lua.c | |
parent | 40997b8ae5b4065b3e71d4369eaba14c991e5027 (diff) | |
download | mpv-04c02796bd371e65f81a92b853658b8fbadb7ad5.tar.bz2 mpv-04c02796bd371e65f81a92b853658b8fbadb7ad5.tar.xz |
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().
Diffstat (limited to 'player/lua.c')
-rw-r--r-- | player/lua.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |