aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2006-07-15 13:42:57 +0000
committerEric Wong <normalperson@yhbt.net>2006-07-15 13:42:57 +0000
commitb4df8b8f880648e63781395e1a350f258b809a18 (patch)
tree3e26b8faf86cf68f35506eb3e59b73d9477211e7 /src
parent563e4c95fdea05dc162442d6b3a66e3fa0a13a48 (diff)
De-inline non-trivial, non-performance-critical functions
Functions that should stay inlined should have an explanation attached to them. git-svn-id: https://svn.musicpd.org/mpd/trunk@4355 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-rw-r--r--src/audio.c2
-rw-r--r--src/audioOutputs/audioOutput_alsa.c2
-rw-r--r--src/dbUtils.c4
-rw-r--r--src/inputPlugins/_flac_common.h1
-rw-r--r--src/inputPlugins/mpc_plugin.c3
-rw-r--r--src/inputPlugins/oggvorbis_plugin.c2
-rw-r--r--src/tag.c2
7 files changed, 9 insertions, 7 deletions
diff --git a/src/audio.c b/src/audio.c
index d0cd53da..da2a20c8 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -251,7 +251,7 @@ int isCurrentAudioFormat(AudioFormat * audioFormat) {
return 1;
}
-inline void syncAudioDevicesEnabledArrays() {
+static void syncAudioDevicesEnabledArrays(void) {
int i;
memcpy(myAudioDevicesEnabled, pdAudioDevicesEnabled,AUDIO_MAX_DEVICES);
diff --git a/src/audioOutputs/audioOutput_alsa.c b/src/audioOutputs/audioOutput_alsa.c
index 4484d2ca..976b72d3 100644
--- a/src/audioOutputs/audioOutput_alsa.c
+++ b/src/audioOutputs/audioOutput_alsa.c
@@ -283,7 +283,7 @@ fail:
return -1;
}
-inline static int alsa_errorRecovery(AlsaData * ad, int err) {
+static int alsa_errorRecovery(AlsaData * ad, int err) {
if(err == -EPIPE) {
DEBUG("Underrun on alsa device \"%s\"\n", ad->device);
}
diff --git a/src/dbUtils.c b/src/dbUtils.c
index ecc8b887..236d0d73 100644
--- a/src/dbUtils.c
+++ b/src/dbUtils.c
@@ -147,7 +147,7 @@ static int printSongInDirectory(FILE * fp, Song * song, void * data) {
return 0;
}
-static inline int strstrSearchTag(Song * song, int type, char * str) {
+static int strstrSearchTag(Song * song, int type, char * str) {
int i;
char * dup;
int ret = 0;
@@ -224,7 +224,7 @@ int searchForSongsIn(FILE * fp, char * name, int numItems,
return ret;
}
-static inline int tagItemFoundAndMatches(Song * song, int type, char * str) {
+static int tagItemFoundAndMatches(Song * song, int type, char * str) {
int i;
if(type == LOCATE_TAG_FILE_TYPE) {
diff --git a/src/inputPlugins/_flac_common.h b/src/inputPlugins/_flac_common.h
index 88fa4da5..2834d352 100644
--- a/src/inputPlugins/_flac_common.h
+++ b/src/inputPlugins/_flac_common.h
@@ -60,6 +60,7 @@ void flac_error_common_cb( const char * plugin,
MpdTag * copyVorbisCommentBlockToMpdTag(const FLAC__StreamMetadata * block,
MpdTag * tag);
+/* keep this inlined, this is just macro but prettier :) */
static inline int flacSendChunk(FlacData * data)
{
if (sendDataToOutputBuffer(data->cb, NULL, data->dc, 1, data->chunk,
diff --git a/src/inputPlugins/mpc_plugin.c b/src/inputPlugins/mpc_plugin.c
index 30878fc1..253ed089 100644
--- a/src/inputPlugins/mpc_plugin.c
+++ b/src/inputPlugins/mpc_plugin.c
@@ -82,7 +82,8 @@ static mpc_int32_t mpc_getsize_cb(void * vdata) {
return data->inStream->size;
}
-inline mpd_sint16 convertSample(MPC_SAMPLE_FORMAT sample) {
+/* this _looks_ performance-critical, don't de-inline -- eric */
+static inline mpd_sint16 convertSample(MPC_SAMPLE_FORMAT sample) {
/* only doing 16-bit audio for now */
mpd_sint32 val;
diff --git a/src/inputPlugins/oggvorbis_plugin.c b/src/inputPlugins/oggvorbis_plugin.c
index 30034af6..3c699cef 100644
--- a/src/inputPlugins/oggvorbis_plugin.c
+++ b/src/inputPlugins/oggvorbis_plugin.c
@@ -103,7 +103,7 @@ long ogg_tell_cb(void * vdata) {
return (long)(data->inStream->offset);
}
-static inline char * ogg_parseComment(char * comment, char * needle) {
+static char * ogg_parseComment(char * comment, char * needle) {
int len = strlen(needle);
if(strncasecmp(comment, needle, len) == 0 && *(comment+len) == '=') {
diff --git a/src/tag.c b/src/tag.c
index c1896c42..f789de84 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -560,7 +560,7 @@ int mpdTagsAreEqual(MpdTag * tag1, MpdTag * tag2) {
} \
}
-inline static void appendToTagItems(MpdTag * tag, int type, char * value,
+static void appendToTagItems(MpdTag * tag, int type, char * value,
int len)
{
int i = tag->numOfItems;