Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
747e945d
Commit
747e945d
authored
Jun 01, 2010
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playlist_list: move fallback g_uri_parse_scheme() to glib_compat.h
parent
067d7212
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
14 deletions
+16
-14
glib_compat.h
src/glib_compat.h
+15
-0
playlist_list.c
src/playlist_list.c
+1
-14
No files found.
src/glib_compat.h
View file @
747e945d
...
...
@@ -59,4 +59,19 @@ g_uri_escape_string(const char *unescaped,
#endif
/* !2.16 */
#if !GLIB_CHECK_VERSION(2,16,0)
#include <string.h>
static
inline
char
*
g_uri_parse_scheme
(
const
char
*
uri
)
{
const
char
*
end
=
strstr
(
uri
,
"://"
);
if
(
end
==
NULL
)
return
NULL
;
return
g_strndup
(
uri
,
end
-
uri
);
}
#endif
#endif
src/playlist_list.c
View file @
747e945d
...
...
@@ -32,8 +32,7 @@
#include "uri.h"
#include "utils.h"
#include "conf.h"
#include <glib.h>
#include "glib_compat.h"
#include <assert.h>
#include <string.h>
...
...
@@ -112,18 +111,6 @@ playlist_list_global_finish(void)
playlist_plugin_finish
(
playlist_plugins
[
i
]);
}
/* g_uri_parse_scheme() was introduced in GLib 2.16 */
#if !GLIB_CHECK_VERSION(2,16,0)
static
char
*
g_uri_parse_scheme
(
const
char
*
uri
)
{
const
char
*
end
=
strstr
(
uri
,
"://"
);
if
(
end
==
NULL
)
return
NULL
;
return
g_strndup
(
uri
,
end
-
uri
);
}
#endif
static
struct
playlist_provider
*
playlist_list_open_uri_scheme
(
const
char
*
uri
,
bool
*
tried
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment