[vlc-commits] config: remove unused config_GetPsz() parameter

Rémi Denis-Courmont git at videolan.org
Wed Feb 28 19:12:05 CET 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Feb 28 19:13:04 2018 +0200| [3c0909d8a0d77749a3baf1b89dfe3554f2dddf59] | committer: Rémi Denis-Courmont

config: remove unused config_GetPsz() parameter

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3c0909d8a0d77749a3baf1b89dfe3554f2dddf59
---

 include/vlc_configuration.h                      |  4 +--
 modules/gui/macosx/VLCCoreInteraction.m          |  2 +-
 modules/gui/macosx/VLCMainMenu.m                 | 32 ++++++++++++------------
 modules/gui/macosx/VLCMainWindow.m               | 12 ++++-----
 modules/gui/macosx/VLCSimplePrefsController.m    |  8 +++---
 modules/gui/macosx/prefs_widgets.m               |  6 ++---
 modules/gui/ncurses.c                            |  2 +-
 modules/gui/qt/components/extended_panels.cpp    |  2 +-
 modules/gui/qt/components/open_panels.cpp        |  4 +--
 modules/gui/qt/components/simple_preferences.cpp | 12 ++++-----
 modules/gui/qt/dialogs/podcast_configuration.cpp |  2 +-
 modules/gui/skins2/src/skin_main.cpp             |  2 +-
 modules/gui/skins2/src/theme.cpp                 |  2 +-
 modules/gui/skins2/src/theme_repository.cpp      |  2 +-
 modules/lua/libs/configuration.c                 |  3 +--
 modules/services_discovery/upnp.cpp              |  4 +--
 src/config/core.c                                |  3 +--
 src/config/intf.c                                | 14 +++++------
 src/misc/variables.c                             |  2 +-
 src/win32/netconf.c                              |  4 +--
 20 files changed, 58 insertions(+), 64 deletions(-)

diff --git a/include/vlc_configuration.h b/include/vlc_configuration.h
index 92d92cd668..aef05c5378 100644
--- a/include/vlc_configuration.h
+++ b/include/vlc_configuration.h
@@ -203,8 +203,7 @@ VLC_API void config_PutFloat(vlc_object_t *, const char *name, float val);
  * or if an error occurs, NULL is returned.
  * \bug The empty string value cannot be distinguished from an error.
  */
-VLC_API char * config_GetPsz(vlc_object_t *, const char *name)
-VLC_USED VLC_MALLOC;
+VLC_API char *config_GetPsz(const char *name) VLC_USED VLC_MALLOC;
 
 /**
  * Sets an string configuration item.
@@ -326,7 +325,6 @@ VLC_API bool config_ExistIntf( vlc_object_t *, const char * ) VLC_USED;
 
 #define config_PutInt(a,b,c) config_PutInt(VLC_OBJECT(a),b,c)
 #define config_PutFloat(a,b,c) config_PutFloat(VLC_OBJECT(a),b,c)
-#define config_GetPsz(a,b) config_GetPsz(VLC_OBJECT(a),b)
 #define config_PutPsz(a,b,c) config_PutPsz(VLC_OBJECT(a),b,c)
 
 #define config_AddIntf(a,b) config_AddIntf(VLC_OBJECT(a),b)
diff --git a/modules/gui/macosx/VLCCoreInteraction.m b/modules/gui/macosx/VLCCoreInteraction.m
index b9c487c5d6..21a2a8b017 100644
--- a/modules/gui/macosx/VLCCoreInteraction.m
+++ b/modules/gui/macosx/VLCCoreInteraction.m
@@ -686,7 +686,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
     BOOL b_needsRestart = NO;
 
     #define fixpref(pref) \
-    o_workString = [[NSMutableString alloc] initWithFormat:@"%s", config_GetPsz(getIntf(), pref)]; \
+    o_workString = [[NSMutableString alloc] initWithFormat:@"%s", config_GetPsz(pref)]; \
     if ([o_workString length] > 0) \
     { \
         returnedRange = [o_workString rangeOfString:@"macosx" options: NSCaseInsensitiveSearch]; \
diff --git a/modules/gui/macosx/VLCMainMenu.m b/modules/gui/macosx/VLCMainMenu.m
index 0cffd4c377..b2596a7eeb 100644
--- a/modules/gui/macosx/VLCMainMenu.m
+++ b/modules/gui/macosx/VLCMainMenu.m
@@ -114,7 +114,7 @@
 
     [self initStrings];
 
-    key = config_GetPsz(p_intf, "key-quit");
+    key = config_GetPsz("key-quit");
     keyString = [NSString stringWithFormat:@"%s", key];
     [_quit setKeyEquivalent: [stringUtility VLCKeyToString: keyString]];
     [_quit setKeyEquivalentModifierMask: [stringUtility VLCModifiersToCocoa:keyString]];
@@ -122,85 +122,85 @@
 
     // do not assign play/pause key
 
-    key = config_GetPsz(p_intf, "key-stop");
+    key = config_GetPsz("key-stop");
     keyString = [NSString stringWithFormat:@"%s", key];
     [_stop setKeyEquivalent: [stringUtility VLCKeyToString: keyString]];
     [_stop setKeyEquivalentModifierMask: [stringUtility VLCModifiersToCocoa:keyString]];
     FREENULL(key);
 
-    key = config_GetPsz(p_intf, "key-prev");
+    key = config_GetPsz("key-prev");
     keyString = [NSString stringWithFormat:@"%s", key];
     [_previous setKeyEquivalent: [stringUtility VLCKeyToString: keyString]];
     [_previous setKeyEquivalentModifierMask: [stringUtility VLCModifiersToCocoa:keyString]];
     FREENULL(key);
 
-    key = config_GetPsz(p_intf, "key-next");
+    key = config_GetPsz("key-next");
     keyString = [NSString stringWithFormat:@"%s", key];
     [_next setKeyEquivalent: [stringUtility VLCKeyToString: keyString]];
     [_next setKeyEquivalentModifierMask: [stringUtility VLCModifiersToCocoa:keyString]];
     FREENULL(key);
 
-    key = config_GetPsz(p_intf, "key-jump+short");
+    key = config_GetPsz("key-jump+short");
     keyString = [NSString stringWithFormat:@"%s", key];
     [_fwd setKeyEquivalent: [stringUtility VLCKeyToString: keyString]];
     [_fwd setKeyEquivalentModifierMask: [stringUtility VLCModifiersToCocoa:keyString]];
     FREENULL(key);
 
-    key = config_GetPsz(p_intf, "key-jump-short");
+    key = config_GetPsz("key-jump-short");
     keyString = [NSString stringWithFormat:@"%s", key];
     [_bwd setKeyEquivalent: [stringUtility VLCKeyToString: keyString]];
     [_bwd setKeyEquivalentModifierMask: [stringUtility VLCModifiersToCocoa:keyString]];
     FREENULL(key);
 
-    key = config_GetPsz(p_intf, "key-vol-up");
+    key = config_GetPsz("key-vol-up");
     keyString = [NSString stringWithFormat:@"%s", key];
     [_vol_up setKeyEquivalent: [stringUtility VLCKeyToString: keyString]];
     [_vol_up setKeyEquivalentModifierMask: [stringUtility VLCModifiersToCocoa:keyString]];
     FREENULL(key);
 
-    key = config_GetPsz(p_intf, "key-vol-down");
+    key = config_GetPsz("key-vol-down");
     keyString = [NSString stringWithFormat:@"%s", key];
     [_vol_down setKeyEquivalent: [stringUtility VLCKeyToString: keyString]];
     [_vol_down setKeyEquivalentModifierMask: [stringUtility VLCModifiersToCocoa:keyString]];
     FREENULL(key);
 
-    key = config_GetPsz(p_intf, "key-vol-mute");
+    key = config_GetPsz("key-vol-mute");
     keyString = [NSString stringWithFormat:@"%s", key];
     [_mute setKeyEquivalent: [stringUtility VLCKeyToString: keyString]];
     [_mute setKeyEquivalentModifierMask: [stringUtility VLCModifiersToCocoa:keyString]];
     FREENULL(key);
 
-    key = config_GetPsz(p_intf, "key-toggle-fullscreen");
+    key = config_GetPsz("key-toggle-fullscreen");
     keyString = [NSString stringWithFormat:@"%s", key];
     [_fullscreenItem setKeyEquivalent: [stringUtility VLCKeyToString: keyString]];
     [_fullscreenItem setKeyEquivalentModifierMask: [stringUtility VLCModifiersToCocoa:keyString]];
     FREENULL(key);
 
-    key = config_GetPsz(p_intf, "key-snapshot");
+    key = config_GetPsz("key-snapshot");
     keyString = [NSString stringWithFormat:@"%s", key];
     [_snapshot setKeyEquivalent: [stringUtility VLCKeyToString: keyString]];
     [_snapshot setKeyEquivalentModifierMask: [stringUtility VLCModifiersToCocoa:keyString]];
     FREENULL(key);
 
-    key = config_GetPsz(p_intf, "key-random");
+    key = config_GetPsz("key-random");
     keyString = [NSString stringWithFormat:@"%s", key];
     [_random setKeyEquivalent: [stringUtility VLCKeyToString: keyString]];
     [_random setKeyEquivalentModifierMask: [stringUtility VLCModifiersToCocoa:keyString]];
     FREENULL(key);
 
-    key = config_GetPsz(p_intf, "key-zoom-half");
+    key = config_GetPsz("key-zoom-half");
     keyString = [NSString stringWithFormat:@"%s", key];
     [_half_window setKeyEquivalent: [stringUtility VLCKeyToString: keyString]];
     [_half_window setKeyEquivalentModifierMask: [stringUtility VLCModifiersToCocoa:keyString]];
     FREENULL(key);
 
-    key = config_GetPsz(p_intf, "key-zoom-original");
+    key = config_GetPsz("key-zoom-original");
     keyString = [NSString stringWithFormat:@"%s", key];
     [_normal_window setKeyEquivalent: [stringUtility VLCKeyToString: keyString]];
     [_normal_window setKeyEquivalentModifierMask: [stringUtility VLCModifiersToCocoa:keyString]];
     FREENULL(key);
 
-    key = config_GetPsz(p_intf, "key-zoom-double");
+    key = config_GetPsz("key-zoom-double");
     keyString = [NSString stringWithFormat:@"%s", key];
     [_double_window setKeyEquivalent: [stringUtility VLCKeyToString: keyString]];
     [_double_window setKeyEquivalentModifierMask: [stringUtility VLCModifiersToCocoa:keyString]];
@@ -254,7 +254,7 @@
         [mitem setTag:x];
         [mitem setTarget:self];
     }
-    char *psz_config = config_GetPsz(p_intf, "video-filter");
+    char *psz_config = config_GetPsz("video-filter");
     if (psz_config) {
         if (!strstr(psz_config, "postproc"))
             [[_postprocessingMenu itemAtIndex:0] setState:NSOnState];
diff --git a/modules/gui/macosx/VLCMainWindow.m b/modules/gui/macosx/VLCMainWindow.m
index 41a509fcf7..0fa81d6ab0 100644
--- a/modules/gui/macosx/VLCMainWindow.m
+++ b/modules/gui/macosx/VLCMainWindow.m
@@ -91,7 +91,7 @@ static const float f_min_window_height = 307.;
     char *key;
     NSString *o_key;
 
-    key = config_GetPsz(getIntf(), keyString);
+    key = config_GetPsz(keyString);
     o_key = [NSString stringWithFormat:@"%s", key];
     FREENULL(key);
 
@@ -617,7 +617,7 @@ static const float f_min_window_height = 307.;
     if (p_input) {
         NSString *aString = @"";
 
-        if (!config_GetPsz(getIntf(), "video-title")) {
+        if (!config_GetPsz("video-title")) {
             char *format = var_InheritString(getIntf(), "input-title-format");
             if (format) {
                 char *formated = vlc_strfinput(p_input, format);
@@ -626,7 +626,7 @@ static const float f_min_window_height = 307.;
                 free(formated);
             }
         } else
-            aString = toNSStr(config_GetPsz(getIntf(), "video-title"));
+            aString = toNSStr(config_GetPsz("video-title"));
 
         char *uri = input_item_GetURI(input_GetItem(p_input));
 
@@ -1177,8 +1177,8 @@ static const float f_min_window_height = 307.;
 
     if (sender == _podcastSubscribeOkButton && [[_podcastSubscribeUrlField stringValue] length] > 0) {
         NSMutableString *podcastConf = [[NSMutableString alloc] init];
-        if (config_GetPsz(getIntf(), "podcast-urls") != NULL)
-            [podcastConf appendFormat:@"%s|", config_GetPsz(getIntf(), "podcast-urls")];
+        if (config_GetPsz("podcast-urls") != NULL)
+            [podcastConf appendFormat:@"%s|", config_GetPsz("podcast-urls")];
 
         [podcastConf appendString: [_podcastSubscribeUrlField stringValue]];
         config_PutPsz(getIntf(), "podcast-urls", [podcastConf UTF8String]);
@@ -1206,7 +1206,7 @@ static const float f_min_window_height = 307.;
         playlist_t * p_playlist = pl_Get(getIntf());
         char *psz_urls = var_InheritString(p_playlist, "podcast-urls");
 
-        NSMutableArray * urls = [[NSMutableArray alloc] initWithArray:[toNSStr(config_GetPsz(getIntf(), "podcast-urls")) componentsSeparatedByString:@"|"]];
+        NSMutableArray * urls = [[NSMutableArray alloc] initWithArray:[toNSStr(config_GetPsz("podcast-urls")) componentsSeparatedByString:@"|"]];
         [urls removeObjectAtIndex: [_podcastUnsubscribePopUpButton indexOfSelectedItem]];
         const char *psz_new_urls = [[urls componentsJoinedByString:@"|"] UTF8String];
         var_SetString(pl_Get(getIntf()), "podcast-urls", psz_new_urls);
diff --git a/modules/gui/macosx/VLCSimplePrefsController.m b/modules/gui/macosx/VLCSimplePrefsController.m
index d2a2974814..fca7535651 100644
--- a/modules/gui/macosx/VLCSimplePrefsController.m
+++ b/modules/gui/macosx/VLCSimplePrefsController.m
@@ -491,7 +491,7 @@ static inline const char * __config_GetLabel(vlc_object_t *p_this, const char *p
 
 - (void)setupField:(NSTextField *)object forOption:(const char *)psz_option
 {
-    char *psz_tmp = config_GetPsz(p_intf, psz_option);
+    char *psz_tmp = config_GetPsz(psz_option);
     [object setStringValue: toNSStr(psz_tmp)];
     [object setToolTip: _NS(config_GetLabel(p_intf, psz_option))];
     free(psz_tmp);
@@ -499,7 +499,7 @@ static inline const char * __config_GetLabel(vlc_object_t *p_this, const char *p
 
 - (BOOL)hasModule:(NSString *)moduleName inConfig:(NSString *)config
 {
-    char *value = config_GetPsz(p_intf, [config UTF8String]);
+    char *value = config_GetPsz([config UTF8String]);
     NSString *modules = toNSStr(value);
     free(value);
 
@@ -508,7 +508,7 @@ static inline const char * __config_GetLabel(vlc_object_t *p_this, const char *p
 
 - (void)changeModule:(NSString *)moduleName inConfig:(NSString *)config enable:(BOOL)enable
 {
-    char *value = config_GetPsz(p_intf, [config UTF8String]);
+    char *value = config_GetPsz([config UTF8String]);
     NSString *modules = toNSStr(value);
     free(value);
 
@@ -1217,7 +1217,7 @@ static inline void save_string_list(intf_thread_t * p_intf, id object, const cha
 
 - (IBAction)showFontPicker:(id)sender
 {
-    char * font = config_GetPsz(p_intf, "freetype-font");
+    char * font = config_GetPsz("freetype-font");
     NSString * fontName = font ? toNSStr(font) : nil;
     free(font);
     if (fontName) {
diff --git a/modules/gui/macosx/prefs_widgets.m b/modules/gui/macosx/prefs_widgets.m
index 4baa5fd84f..aef041ee20 100644
--- a/modules/gui/macosx/prefs_widgets.m
+++ b/modules/gui/macosx/prefs_widgets.m
@@ -974,7 +974,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 - (void)resetValues
 {
     NSString *o_textfieldString;
-    char *psz_value = config_GetPsz(getIntf(), self.p_item->psz_name);
+    char *psz_value = config_GetPsz(self.p_item->psz_name);
     if (psz_value)
         o_textfieldString = _NS(psz_value);
     else
@@ -1055,7 +1055,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 {
     [o_popup removeAllItems];
 
-    char *psz_value = config_GetPsz(getIntf(), self.p_item->psz_name);
+    char *psz_value = config_GetPsz(self.p_item->psz_name);
 
     char **values, **texts;
     ssize_t count = config_GetPszChoices(VLC_OBJECT(getIntf()), self.p_item->psz_name,
@@ -1170,7 +1170,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 -(void)resetValues
 {
     NSString *o_textfieldString;
-    char *psz_value = config_GetPsz(getIntf(), self.p_item->psz_name);
+    char *psz_value = config_GetPsz(self.p_item->psz_name);
     if (psz_value)
         o_textfieldString = [NSString stringWithFormat: @"%s", psz_value];
     else
diff --git a/modules/gui/ncurses.c b/modules/gui/ncurses.c
index 5416e1daa6..ab3eeecbde 100644
--- a/modules/gui/ncurses.c
+++ b/modules/gui/ncurses.c
@@ -1222,7 +1222,7 @@ static char *GetDiscDevice(intf_thread_t *intf, const char *name)
         size_t n = devs[i].n;
         if (!strncmp(name, devs[i].s, n)) {
             if (name[n] == '@' || name[n] == '\0')
-                return config_GetPsz(intf, devs[i].v);
+                return config_GetPsz(devs[i].v);
             /* Omit the beginning MRL-selector characters */
             return strdup(name + n);
         }
diff --git a/modules/gui/qt/components/extended_panels.cpp b/modules/gui/qt/components/extended_panels.cpp
index afe9c31189..6d0c02c9c1 100644
--- a/modules/gui/qt/components/extended_panels.cpp
+++ b/modules/gui/qt/components/extended_panels.cpp
@@ -1026,7 +1026,7 @@ QStringList EqualizerSliderData::getBandsFromAout() const
     if ( ! config_FindConfig( qtu(p_data->name) ) )
         return bands;
 
-    char *psz_bands = config_GetPsz( p_intf, qtu(p_data->name) );
+    char *psz_bands = config_GetPsz( qtu(p_data->name) );
     if ( psz_bands )
     {
         bands = QString( psz_bands ).split( " ", QString::SkipEmptyParts );
diff --git a/modules/gui/qt/components/open_panels.cpp b/modules/gui/qt/components/open_panels.cpp
index 47ec13df10..ad3d015bf9 100644
--- a/modules/gui/qt/components/open_panels.cpp
+++ b/modules/gui/qt/components/open_panels.cpp
@@ -350,7 +350,7 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     };
     QComboBox *discCombo = ui.deviceCombo; /* avoid namespacing in macro */
     POPULATE_WITH_DEVS( ppsz_discdevices, discCombo );
-    char *psz_config = config_GetPsz( p_intf, "dvd" );
+    char *psz_config = config_GetPsz( "dvd" );
     int temp = ui.deviceCombo->findData( psz_config, Qt::UserRole, Qt::MatchStartsWith );
     free( psz_config );
     if( temp != -1 )
@@ -415,7 +415,7 @@ void DiscOpenPanel::onFocus()
         SetThreadErrorMode(oldMode, NULL);
     }
 
-    char *psz_config = config_GetPsz( p_intf, "dvd" );
+    char *psz_config = config_GetPsz( "dvd" );
     int temp = ui.deviceCombo->findData( psz_config, Qt::UserRole, Qt::MatchStartsWith );
     free( psz_config );
     if( temp != -1 )
diff --git a/modules/gui/qt/components/simple_preferences.cpp b/modules/gui/qt/components/simple_preferences.cpp
index 45544708bd..8fcbb164fe 100644
--- a/modules/gui/qt/components/simple_preferences.cpp
+++ b/modules/gui/qt/components/simple_preferences.cpp
@@ -595,7 +595,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
             CONNECT( ui.volNormBox, toggled( bool ), ui.volNormSpin,
                      setEnabled( bool ) );
 
-            char* psz = config_GetPsz( p_intf, "audio-filter" );
+            char* psz = config_GetPsz( "audio-filter" );
             qs_filter = qfu( psz ).split( ':', QString::SkipEmptyParts );
             free( psz );
 
@@ -618,9 +618,9 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
                          "for DVD, VCD, and CDDA are set.\n"
                          "You can define a unique one or configure them \n"
                          "individually in the advanced preferences." ) );
-                char *psz_dvddiscpath = config_GetPsz( p_intf, "dvd" );
-                char *psz_vcddiscpath = config_GetPsz( p_intf, "vcd" );
-                char *psz_cddadiscpath = config_GetPsz( p_intf, "cd-audio" );
+                char *psz_dvddiscpath = config_GetPsz( "dvd" );
+                char *psz_vcddiscpath = config_GetPsz( "vcd" );
+                char *psz_cddadiscpath = config_GetPsz( "cd-audio" );
                 if( psz_dvddiscpath && psz_vcddiscpath && psz_cddadiscpath )
                 if( !strcmp( psz_cddadiscpath, psz_dvddiscpath ) &&
                     !strcmp( psz_dvddiscpath, psz_vcddiscpath ) )
@@ -746,7 +746,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
 #endif
 
             /* interface */
-            char *psz_intf = config_GetPsz( p_intf, "intf" );
+            char *psz_intf = config_GetPsz( "intf" );
             if( psz_intf )
             {
                 if( strstr( psz_intf, "skin" ) )
@@ -1113,7 +1113,7 @@ void SPrefsPanel::apply()
             qobject_cast<QSlider *>(optionWidgets["defaultVolume"])->value();
         bool b_reset_volume =
             qobject_cast<QCheckBox *>(optionWidgets["resetVolumeCheckbox"])->isChecked();
-        char *psz_aout = config_GetPsz( p_intf, "aout" );
+        char *psz_aout = config_GetPsz( "aout" );
 
         float f_gain = powf( i_volume / 100.f, 3 );
 
diff --git a/modules/gui/qt/dialogs/podcast_configuration.cpp b/modules/gui/qt/dialogs/podcast_configuration.cpp
index e6a1521008..a78ab1695e 100644
--- a/modules/gui/qt/dialogs/podcast_configuration.cpp
+++ b/modules/gui/qt/dialogs/podcast_configuration.cpp
@@ -42,7 +42,7 @@ PodcastConfigDialog::PodcastConfigDialog( intf_thread_t *_p_intf)
     CONNECT( ui.podcastDelete, clicked(), this, remove() );
     CONNECT( okButton, clicked(), this, close() );
 
-    char *psz_urls = config_GetPsz( p_intf, "podcast-urls" );
+    char *psz_urls = config_GetPsz( "podcast-urls" );
     if( psz_urls )
     {
         char *psz_url = psz_urls;
diff --git a/modules/gui/skins2/src/skin_main.cpp b/modules/gui/skins2/src/skin_main.cpp
index 69bbf0fd44..85eeef20cc 100644
--- a/modules/gui/skins2/src/skin_main.cpp
+++ b/modules/gui/skins2/src/skin_main.cpp
@@ -250,7 +250,7 @@ static void *Run( void * p_obj )
     }
 
     // Load a theme
-    skin_last = config_GetPsz( p_intf, "skins2-last" );
+    skin_last = config_GetPsz( "skins2-last" );
     pLoader = new ThemeLoader( p_intf );
 
     if( !skin_last || !pLoader->load( skin_last ) )
diff --git a/modules/gui/skins2/src/theme.cpp b/modules/gui/skins2/src/theme.cpp
index 710047ed00..58aafa38a1 100644
--- a/modules/gui/skins2/src/theme.cpp
+++ b/modules/gui/skins2/src/theme.cpp
@@ -98,7 +98,7 @@ int Theme::readConfig()
     msg_Dbg( getIntf(), "reading theme configuration");
 
     // Get config from vlcrc file
-    char *save = config_GetPsz( getIntf(), "skins2-config" );
+    char *save = config_GetPsz( "skins2-config" );
     if( !save || !*save )
     {
         free( save );
diff --git a/modules/gui/skins2/src/theme_repository.cpp b/modules/gui/skins2/src/theme_repository.cpp
index 9d02b310ae..659cc008b6 100644
--- a/modules/gui/skins2/src/theme_repository.cpp
+++ b/modules/gui/skins2/src/theme_repository.cpp
@@ -207,7 +207,7 @@ void ThemeRepository::updateRepository()
     vlc_value_t val, text;
 
     // retrieve the current skin
-    char* psz_current = config_GetPsz( getIntf(), "skins2-last" );
+    char* psz_current = config_GetPsz( "skins2-last" );
     if( !psz_current )
         return;
 
diff --git a/modules/lua/libs/configuration.c b/modules/lua/libs/configuration.c
index 7ac675abdd..a2045f5d1a 100644
--- a/modules/lua/libs/configuration.c
+++ b/modules/lua/libs/configuration.c
@@ -42,13 +42,12 @@
  *****************************************************************************/
 static int vlclua_config_get( lua_State *L )
 {
-    vlc_object_t * p_this = vlclua_get_this( L );
     const char *psz_name = luaL_checkstring( L, 1 );
     switch( config_GetType( psz_name ) )
     {
         case VLC_VAR_STRING:
         {
-            char *psz = config_GetPsz( p_this, psz_name );
+            char *psz = config_GetPsz( psz_name );
             lua_pushstring( L, psz );
             free( psz );
             break;
diff --git a/modules/services_discovery/upnp.cpp b/modules/services_discovery/upnp.cpp
index ca2124ed15..a4c367dbce 100644
--- a/modules/services_discovery/upnp.cpp
+++ b/modules/services_discovery/upnp.cpp
@@ -482,14 +482,14 @@ void MediaServerList::parseNewServer( IXML_Document *doc, const std::string &loc
             vlc_url_t url;
             vlc_UrlParse( &url, psz_base_url );
 
-            char *psz_satip_channellist = config_GetPsz(m_sd, "satip-channelist");
+            char *psz_satip_channellist = config_GetPsz("satip-channelist");
             if( !psz_satip_channellist ) {
                 break;
             }
 
             /* a user may have provided a custom playlist url */
             if (strncmp(psz_satip_channellist, "CustomList", 10) == 0) {
-                char *psz_satip_playlist_url = config_GetPsz( m_sd, "satip-channellist-url" );
+                char *psz_satip_playlist_url = config_GetPsz( "satip-channellist-url" );
                 if ( psz_satip_playlist_url ) {
                     p_server = new(std::nothrow) SD::MediaServerDesc( psz_udn, psz_friendly_name, psz_satip_playlist_url, iconUrl );
 
diff --git a/src/config/core.c b/src/config/core.c
index 4314f93484..315f1fb7a6 100644
--- a/src/config/core.c
+++ b/src/config/core.c
@@ -111,8 +111,7 @@ float config_GetFloat(const char *psz_name)
     return val;
 }
 
-#undef config_GetPsz
-char * config_GetPsz( vlc_object_t *p_this, const char *psz_name )
+char *config_GetPsz(const char *psz_name)
 {
     module_config_t *p_config;
 
diff --git a/src/config/intf.c b/src/config/intf.c
index 7d7ac5029d..314b681edd 100644
--- a/src/config/intf.c
+++ b/src/config/intf.c
@@ -40,7 +40,7 @@ void config_AddIntf( vlc_object_t *p_this, const char *psz_intf )
     char *psz_config, *psz_parser;
     size_t i_len = strlen( psz_intf );
 
-    psz_config = psz_parser = config_GetPsz( libvlc, "control" );
+    psz_config = psz_parser = config_GetPsz( "control" );
     while( psz_parser )
     {
         if( !strncmp( psz_intf, psz_parser, i_len ) )
@@ -53,7 +53,7 @@ void config_AddIntf( vlc_object_t *p_this, const char *psz_intf )
     }
     free( psz_config );
 
-    psz_config = psz_parser = config_GetPsz( libvlc, "extraintf" );
+    psz_config = psz_parser = config_GetPsz( "extraintf" );
     while( psz_parser )
     {
         if( !strncmp( psz_intf, psz_parser, i_len ) )
@@ -92,7 +92,7 @@ void config_RemoveIntf( vlc_object_t *p_this, const char *psz_intf )
     char *psz_config, *psz_parser;
     size_t i_len = strlen( psz_intf );
 
-    psz_config = psz_parser = config_GetPsz( libvlc, "extraintf" );
+    psz_config = psz_parser = config_GetPsz( "extraintf" );
     while( psz_parser )
     {
         if( !strncmp( psz_intf, psz_parser, i_len ) )
@@ -113,7 +113,7 @@ void config_RemoveIntf( vlc_object_t *p_this, const char *psz_intf )
     }
     free( psz_config );
 
-    psz_config = psz_parser = config_GetPsz( libvlc, "control" );
+    psz_config = psz_parser = config_GetPsz( "control" );
     while( psz_parser )
     {
         if( !strncmp( psz_intf, psz_parser, i_len ) )
@@ -142,14 +142,12 @@ void config_RemoveIntf( vlc_object_t *p_this, const char *psz_intf )
  */
 bool config_ExistIntf( vlc_object_t *p_this, const char *psz_intf )
 {
-    vlc_object_t *libvlc = VLC_OBJECT(p_this->obj.libvlc);
-
     assert( psz_intf );
 
     char *psz_config, *psz_parser;
     size_t i_len = strlen( psz_intf );
 
-    psz_config = psz_parser = config_GetPsz( libvlc, "extraintf" );
+    psz_config = psz_parser = config_GetPsz( "extraintf" );
     while( psz_parser )
     {
         if( !strncmp( psz_parser, psz_intf, i_len ) )
@@ -162,7 +160,7 @@ bool config_ExistIntf( vlc_object_t *p_this, const char *psz_intf )
     }
     free( psz_config );
 
-    psz_config = psz_parser = config_GetPsz( libvlc, "control" );
+    psz_config = psz_parser = config_GetPsz( "control" );
     while( psz_parser )
     {
         if( !strncmp( psz_parser, psz_intf, i_len ) )
diff --git a/src/misc/variables.c b/src/misc/variables.c
index ed69a02699..0bf6bbad0e 100644
--- a/src/misc/variables.c
+++ b/src/misc/variables.c
@@ -1184,7 +1184,7 @@ int var_Inherit( vlc_object_t *p_this, const char *psz_name, int i_type,
     switch( i_type & VLC_VAR_CLASS )
     {
         case VLC_VAR_STRING:
-            p_val->psz_string = config_GetPsz( p_this, psz_name );
+            p_val->psz_string = config_GetPsz( psz_name );
             if( !p_val->psz_string ) p_val->psz_string = strdup("");
             break;
         case VLC_VAR_FLOAT:
diff --git a/src/win32/netconf.c b/src/win32/netconf.c
index 81458ab37a..8651092fef 100644
--- a/src/win32/netconf.c
+++ b/src/win32/netconf.c
@@ -33,11 +33,11 @@ char *vlc_getProxyUrl(const char *psz_url)
 {
     VLC_UNUSED(psz_url);
 
-    char *proxy = config_GetPsz( (vlc_object_t *)(NULL), "http-proxy" );
+    char *proxy = config_GetPsz( "http-proxy" );
     if (proxy == NULL)
         return NULL;
 
-    char *proxy_pwd = config_GetPsz( (vlc_object_t *)(NULL), "http-proxy-pwd" );
+    char *proxy_pwd = config_GetPsz( "http-proxy-pwd" );
     if (proxy_pwd == NULL)
         return proxy;
 



More information about the vlc-commits mailing list