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
39d35219
Commit
39d35219
authored
Mar 07, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
music_pipe: added music_pipe_peek()
music_pipe_peek() is similar to music_pipe_shift(), but doesn't remove the chunk. This allows it to be used with a "const" music_pipe.
parent
b13cd03f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
pipe.c
src/pipe.c
+6
-0
pipe.h
src/pipe.h
+7
-0
No files found.
src/pipe.c
View file @
39d35219
...
...
@@ -61,6 +61,12 @@ music_pipe_free(struct music_pipe *mp)
g_free
(
mp
);
}
const
struct
music_chunk
*
music_pipe_peek
(
const
struct
music_pipe
*
mp
)
{
return
mp
->
head
;
}
struct
music_chunk
*
music_pipe_shift
(
struct
music_pipe
*
mp
)
{
...
...
src/pipe.h
View file @
39d35219
...
...
@@ -41,6 +41,13 @@ void
music_pipe_free
(
struct
music_pipe
*
mp
);
/**
* Returns the first #music_chunk from the pipe. Returns NULL if the
* pipe is empty.
*/
const
struct
music_chunk
*
music_pipe_peek
(
const
struct
music_pipe
*
mp
);
/**
* Removes the first chunk from the head, and returns it.
*/
struct
music_chunk
*
...
...
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