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

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


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

config: remove unused config_GetInt() parameter

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

 include/vlc_configuration.h                      |  3 +--
 modules/gui/macosx/VLCAboutWindowController.m    |  2 +-
 modules/gui/macosx/VLCControlsBarCommon.m        |  2 +-
 modules/gui/macosx/VLCCoreInteraction.m          | 10 ++++-----
 modules/gui/macosx/VLCInputManager.m             |  2 +-
 modules/gui/macosx/VLCMainMenu.m                 |  4 ++--
 modules/gui/macosx/VLCMainWindow.m               |  4 ++--
 modules/gui/macosx/VLCOpenWindowController.m     | 26 ++++++++++++------------
 modules/gui/macosx/VLCSimplePrefsController.m    | 16 +++++++--------
 modules/gui/macosx/Windows.m                     |  2 +-
 modules/gui/macosx/prefs_widgets.m               | 10 ++++-----
 modules/gui/qt/components/simple_preferences.cpp | 16 +++++++--------
 modules/lua/libs/configuration.c                 |  4 ++--
 src/config/core.c                                |  3 +--
 src/misc/variables.c                             |  4 ++--
 15 files changed, 53 insertions(+), 55 deletions(-)

diff --git a/include/vlc_configuration.h b/include/vlc_configuration.h
index 0a02b05b41..56dc1db414 100644
--- a/include/vlc_configuration.h
+++ b/include/vlc_configuration.h
@@ -131,7 +131,7 @@ VLC_API int config_GetType(const char *name) VLC_USED;
  * \return The configuration item value or -1 if not found.
  * \bug A legitimate integer value of -1 cannot be distinguished from an error.
  */
-VLC_API int64_t config_GetInt(vlc_object_t *, const char *) VLC_USED;
+VLC_API int64_t config_GetInt(const char *) VLC_USED;
 
 /**
  * Sets an integer configuration item.
@@ -324,7 +324,6 @@ VLC_API void config_AddIntf( vlc_object_t *, const char * );
 VLC_API void config_RemoveIntf( vlc_object_t *, const char * );
 VLC_API bool config_ExistIntf( vlc_object_t *, const char * ) VLC_USED;
 
-#define config_GetInt(a,b) config_GetInt(VLC_OBJECT(a),b)
 #define config_PutInt(a,b,c) config_PutInt(VLC_OBJECT(a),b,c)
 #define config_GetFloat(a,b) config_GetFloat(VLC_OBJECT(a),b)
 #define config_PutFloat(a,b,c) config_PutFloat(VLC_OBJECT(a),b,c)
diff --git a/modules/gui/macosx/VLCAboutWindowController.m b/modules/gui/macosx/VLCAboutWindowController.m
index 6230a6b5c5..a3c2f08664 100644
--- a/modules/gui/macosx/VLCAboutWindowController.m
+++ b/modules/gui/macosx/VLCAboutWindowController.m
@@ -158,7 +158,7 @@
     [[self window] setMenu:nil];
     [[self window] setBackgroundColor: [NSColor colorWithCalibratedWhite:.96 alpha:1.]];
 
-    if (config_GetInt(getIntf(), "macosx-icon-change")) {
+    if (config_GetInt("macosx-icon-change")) {
         /* After day 354 of the year, the usual VLC cone is replaced by another cone
          * wearing a Father Xmas hat.
          * Note: this icon doesn't represent an endorsement of The Coca-Cola Company.
diff --git a/modules/gui/macosx/VLCControlsBarCommon.m b/modules/gui/macosx/VLCControlsBarCommon.m
index 61942fe03f..391371706e 100644
--- a/modules/gui/macosx/VLCControlsBarCommon.m
+++ b/modules/gui/macosx/VLCControlsBarCommon.m
@@ -132,7 +132,7 @@
         self.fullscreenButtonWidthConstraint.constant = 0;
     }
 
-    if (config_GetInt(getIntf(), "macosx-show-playback-buttons"))
+    if (config_GetInt("macosx-show-playback-buttons"))
         [self toggleForwardBackwardMode: YES];
 
 }
diff --git a/modules/gui/macosx/VLCCoreInteraction.m b/modules/gui/macosx/VLCCoreInteraction.m
index 636095a6a5..b9c487c5d6 100644
--- a/modules/gui/macosx/VLCCoreInteraction.m
+++ b/modules/gui/macosx/VLCCoreInteraction.m
@@ -656,7 +656,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 
 - (BOOL)aspectRatioIsLocked
 {
-    return config_GetInt(getIntf(), "macosx-lock-aspect-ratio");
+    return config_GetInt("macosx-lock-aspect-ratio");
 }
 
 - (void)toggleFullscreen
@@ -1052,27 +1052,27 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
                 [self playOrPause];
             break;
         case kRemoteButtonVolume_Plus:
-            if (config_GetInt(getIntf(), "macosx-appleremote-sysvol"))
+            if (config_GetInt("macosx-appleremote-sysvol"))
                 [NSSound increaseSystemVolume];
             else
                 if (p_intf)
                     var_SetInteger(p_intf->obj.libvlc, "key-action", ACTIONID_VOL_UP);
             break;
         case kRemoteButtonVolume_Minus:
-            if (config_GetInt(getIntf(), "macosx-appleremote-sysvol"))
+            if (config_GetInt("macosx-appleremote-sysvol"))
                 [NSSound decreaseSystemVolume];
             else
                 if (p_intf)
                     var_SetInteger(p_intf->obj.libvlc, "key-action", ACTIONID_VOL_DOWN);
             break;
         case kRemoteButtonRight:
-            if (config_GetInt(getIntf(), "macosx-appleremote-prevnext"))
+            if (config_GetInt("macosx-appleremote-prevnext"))
                 [self forward];
             else
                 [self next];
             break;
         case kRemoteButtonLeft:
-            if (config_GetInt(getIntf(), "macosx-appleremote-prevnext"))
+            if (config_GetInt("macosx-appleremote-prevnext"))
                 [self backward];
             else
                 [self previous];
diff --git a/modules/gui/macosx/VLCInputManager.m b/modules/gui/macosx/VLCInputManager.m
index bdc115cef7..66a01c0aff 100644
--- a/modules/gui/macosx/VLCInputManager.m
+++ b/modules/gui/macosx/VLCInputManager.m
@@ -579,7 +579,7 @@ static int InputEvent(vlc_object_t *p_this, const char *psz_var,
     if (!lastPosition || lastPosition.intValue <= 0)
         return;
 
-    int settingValue = config_GetInt(getIntf(), "macosx-continue-playback");
+    int settingValue = config_GetInt("macosx-continue-playback");
     if (settingValue == 2) // never resume
         return;
 
diff --git a/modules/gui/macosx/VLCMainMenu.m b/modules/gui/macosx/VLCMainMenu.m
index a63475fab6..0cffd4c377 100644
--- a/modules/gui/macosx/VLCMainMenu.m
+++ b/modules/gui/macosx/VLCMainMenu.m
@@ -259,7 +259,7 @@
         if (!strstr(psz_config, "postproc"))
             [[_postprocessingMenu itemAtIndex:0] setState:NSOnState];
         else
-            [[_postprocessingMenu itemWithTag:config_GetInt(p_intf, "postproc-q")] setState:NSOnState];
+            [[_postprocessingMenu itemWithTag:config_GetInt("postproc-q")] setState:NSOnState];
         free(psz_config);
     } else
         [[_postprocessingMenu itemAtIndex:0] setState:NSOnState];
@@ -276,7 +276,7 @@
     var_Create(p_playlist, "freetype-outline-thickness", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
 
     [self setupMenu: _subtitle_textcolorMenu withIntList:"freetype-color" andSelector:@selector(switchSubtitleOption:)];
-    [_subtitle_bgopacity_sld setIntValue: config_GetInt(VLC_OBJECT(p_intf), "freetype-background-opacity")];
+    [_subtitle_bgopacity_sld setIntValue: config_GetInt("freetype-background-opacity")];
     [self setupMenu: _subtitle_bgcolorMenu withIntList:"freetype-background-color" andSelector:@selector(switchSubtitleOption:)];
     [self setupMenu: _subtitle_outlinethicknessMenu withIntList:"freetype-outline-thickness" andSelector:@selector(switchSubtitleOption:)];
 
diff --git a/modules/gui/macosx/VLCMainWindow.m b/modules/gui/macosx/VLCMainWindow.m
index ec638e455c..41a509fcf7 100644
--- a/modules/gui/macosx/VLCMainWindow.m
+++ b/modules/gui/macosx/VLCMainWindow.m
@@ -531,7 +531,7 @@ static const float f_min_window_height = 307.;
 
 - (void)someWindowWillMiniaturize:(NSNotification *)notification
 {
-    if (config_GetInt(getIntf(), "macosx-pause-minimized")) {
+    if (config_GetInt("macosx-pause-minimized")) {
         id obj = [notification object];
 
         if ([obj class] == [VLCVideoWindowCommon class] || [obj class] == [VLCDetachedVideoWindow class] || ([obj class] == [VLCMainWindow class] && !self.nonembedded)) {
@@ -1252,7 +1252,7 @@ static const float f_min_window_height = 307.;
     [super awakeFromNib];
     [self setAcceptsMouseMovedEvents: YES];
 
-    BOOL darkInterface = config_GetInt(getIntf(), "macosx-interfacestyle");
+    BOOL darkInterface = config_GetInt("macosx-interfacestyle");
 
     if (darkInterface) {
         [self setBackgroundColor: [NSColor clearColor]];
diff --git a/modules/gui/macosx/VLCOpenWindowController.m b/modules/gui/macosx/VLCOpenWindowController.m
index 47740d752b..075d16ff30 100644
--- a/modules/gui/macosx/VLCOpenWindowController.m
+++ b/modules/gui/macosx/VLCOpenWindowController.m
@@ -199,8 +199,8 @@ static NSString *kCaptureTabViewId  = @"capture";
     [[_netModeMatrix cellAtRow:0 column:0] setTitle: _NS("Unicast")];
     [[_netModeMatrix cellAtRow:1 column:0] setTitle: _NS("Multicast")];
 
-    [_netUDPPortTextField setIntValue: config_GetInt(getIntf(), "server-port")];
-    [_netUDPPortStepper setIntValue: config_GetInt(getIntf(), "server-port")];
+    [_netUDPPortTextField setIntValue: config_GetInt("server-port")];
+    [_netUDPPortStepper setIntValue: config_GetInt("server-port")];
 
     [_captureModePopup removeAllItems];
     [_captureModePopup addItemWithTitle: _NS("Input Devices")];
@@ -1011,7 +1011,7 @@ static NSString *kCaptureTabViewId  = @"capture";
             else
                 mrlString = @"rtp://";
 
-            if (port != config_GetInt(getIntf(), "server-port")) {
+            if (port != config_GetInt("server-port")) {
                 mrlString =
                 [mrlString stringByAppendingFormat: @"@:%i", port];
             }
@@ -1025,7 +1025,7 @@ static NSString *kCaptureTabViewId  = @"capture";
             else
                 mrlString = [NSString stringWithFormat: @"rtp://@%@", oAddress];
 
-            if (iPort != config_GetInt(getIntf(), "server-port")) {
+            if (iPort != config_GetInt("server-port")) {
                 mrlString =
                 [mrlString stringByAppendingFormat: @":%i", iPort];
             }
@@ -1060,7 +1060,7 @@ static NSString *kCaptureTabViewId  = @"capture";
             else
                 mrlString = @"rtp://";
 
-            if (port != config_GetInt(getIntf(), "server-port")) {
+            if (port != config_GetInt("server-port")) {
                 mrlString =
                 [mrlString stringByAppendingFormat: @"@:%i", port];
             }
@@ -1074,7 +1074,7 @@ static NSString *kCaptureTabViewId  = @"capture";
             else
                 mrlString = [NSString stringWithFormat: @"rtp://@%@", oAddress];
 
-            if (iPort != config_GetInt(getIntf(), "server-port")) {
+            if (iPort != config_GetInt("server-port")) {
                 mrlString =
                 [mrlString stringByAppendingFormat: @":%i", iPort];
             }
@@ -1097,15 +1097,15 @@ static NSString *kCaptureTabViewId  = @"capture";
         [_captureTabView selectTabViewItemAtIndex:1];
 
         [self setMRL: @"screen://"];
-        [_screenHeightTextField setIntValue: config_GetInt(p_intf, "screen-height")];
-        [_screenWidthTextField setIntValue: config_GetInt(p_intf, "screen-width")];
+        [_screenHeightTextField setIntValue: config_GetInt("screen-height")];
+        [_screenWidthTextField setIntValue: config_GetInt("screen-width")];
         [_screenFPSTextField setFloatValue: config_GetFloat(p_intf, "screen-fps")];
-        [_screenLeftTextField setIntValue: config_GetInt(p_intf, "screen-left")];
-        [_screenTopTextField setIntValue: config_GetInt(p_intf, "screen-top")];
-        [_screenFollowMouseCheckbox setIntValue: config_GetInt(p_intf, "screen-follow-mouse")];
+        [_screenLeftTextField setIntValue: config_GetInt("screen-left")];
+        [_screenTopTextField setIntValue: config_GetInt("screen-top")];
+        [_screenFollowMouseCheckbox setIntValue: config_GetInt("screen-follow-mouse")];
 
-        int screenIindex = config_GetInt(p_intf, "screen-index");
-        int displayID = config_GetInt(p_intf, "screen-display-id");
+        int screenIindex = config_GetInt("screen-index");
+        int displayID = config_GetInt("screen-display-id");
         unsigned int displayCount = 0;
         CGError returnedError;
         struct display_info_t *item;
diff --git a/modules/gui/macosx/VLCSimplePrefsController.m b/modules/gui/macosx/VLCSimplePrefsController.m
index 8483330d0d..d2a2974814 100644
--- a/modules/gui/macosx/VLCSimplePrefsController.m
+++ b/modules/gui/macosx/VLCSimplePrefsController.m
@@ -485,7 +485,7 @@ static inline const char * __config_GetLabel(vlc_object_t *p_this, const char *p
 
 - (void)setupButton: (NSButton *)object forBoolValue: (const char *)name
 {
-    [object setState: config_GetInt(p_intf, name)];
+    [object setState: config_GetInt(name)];
     [object setToolTip: _NS(config_GetLabel(p_intf, name))];
 }
 
@@ -579,7 +579,7 @@ static inline const char * __config_GetLabel(vlc_object_t *p_this, const char *p
     BOOL growlEnabled = [self hasModule:@"growl" inConfig:@"control"];
     [_intf_enableNotificationsCheckbox setState: growlEnabled ? NSOnState : NSOffState];
 
-    if (config_GetInt(p_intf, "macosx-interfacestyle")) {
+    if (config_GetInt("macosx-interfacestyle")) {
         [_intf_style_darkButtonCell setState: YES];
         [_intf_style_brightButtonCell setState: NO];
     } else {
@@ -598,7 +598,7 @@ static inline const char * __config_GetLabel(vlc_object_t *p_this, const char *p
      ******************/
     [self setupButton:_audio_enableCheckbox forBoolValue: "audio"];
 
-    if (config_GetInt(p_intf, "volume-save")) {
+    if (config_GetInt("volume-save")) {
         [_audio_autosavevol_yesButtonCell setState: NSOnState];
         [_audio_autosavevol_noButtonCell setState: NSOffState];
         [_audio_volTextField setEnabled: NO];
@@ -664,7 +664,7 @@ static inline const char * __config_GetLabel(vlc_object_t *p_this, const char *p
         i++;
     }
     [_video_devicePopup selectItemAtIndex: 0];
-    [_video_devicePopup selectItemWithTag: config_GetInt(p_intf, "macosx-vdev")];
+    [_video_devicePopup selectItemWithTag: config_GetInt("macosx-vdev")];
 
     [self setupField:_video_snap_folderTextField forOption:"snapshot-path"];
     [self setupField:_video_snap_prefixTextField forOption:"snapshot-prefix"];
@@ -680,7 +680,7 @@ static inline const char * __config_GetLabel(vlc_object_t *p_this, const char *p
      * input & codecs settings *
      ***************************/
     [self setupField:_input_recordTextField forOption:"input-record-path"];
-    [_input_postprocTextField setIntValue: config_GetInt(p_intf, "postproc-q")];
+    [_input_postprocTextField setIntValue: config_GetInt("postproc-q")];
     [_input_postprocTextField setToolTip: _NS(config_GetLabel(p_intf, "postproc-q"))];
     [self setupButton:_input_skipFramesCheckbox forBoolValue: "skip-frames"];
     [self setupButton:_input_aviPopup forIntList: "avi-index"];
@@ -702,11 +702,11 @@ static inline const char * __config_GetLabel(vlc_object_t *p_this, const char *p
 
     #define TestCaC(name, factor) \
     cache_equal = cache_equal && \
-    (i_cache * factor == config_GetInt(p_intf, name));
+    (i_cache * factor == config_GetInt(name));
 
     /* Select the accurate value of the PopupButton */
     bool cache_equal = true;
-    int i_cache = config_GetInt(p_intf, "file-caching");
+    int i_cache = config_GetInt("file-caching");
 
     TestCaC("network-caching", 10/3);
     TestCaC("disc-caching", 1);
@@ -731,7 +731,7 @@ static inline const char * __config_GetLabel(vlc_object_t *p_this, const char *p
     [self setupField:_osd_fontTextField forOption: "freetype-font"];
     [self setupButton:_osd_font_colorPopup forIntList: "freetype-color"];
     [self setupButton:_osd_font_sizePopup forIntList: "freetype-rel-fontsize"];
-    i = config_GetInt(p_intf, "freetype-opacity") * 100.0 / 255.0 + 0.5;
+    i = config_GetInt("freetype-opacity") * 100.0 / 255.0 + 0.5;
     [_osd_opacityTextField setIntValue: i];
     [_osd_opacitySlider setIntValue: i];
     [_osd_opacitySlider setToolTip: _NS(config_GetLabel(p_intf, "freetype-opacity"))];
diff --git a/modules/gui/macosx/Windows.m b/modules/gui/macosx/Windows.m
index ff89188c8c..ca22a19212 100644
--- a/modules/gui/macosx/Windows.m
+++ b/modules/gui/macosx/Windows.m
@@ -231,7 +231,7 @@
 - (id)initWithContentRect:(NSRect)contentRect styleMask:(NSWindowStyleMask)styleMask
                   backing:(NSBackingStoreType)backingType defer:(BOOL)flag
 {
-    _darkInterface = config_GetInt(getIntf(), "macosx-interfacestyle");
+    _darkInterface = config_GetInt("macosx-interfacestyle");
 
     if (_darkInterface) {
         styleMask = NSBorderlessWindowMask | NSResizableWindowMask | NSMiniaturizableWindowMask;
diff --git a/modules/gui/macosx/prefs_widgets.m b/modules/gui/macosx/prefs_widgets.m
index 224f6da26d..f7160d568e 100644
--- a/modules/gui/macosx/prefs_widgets.m
+++ b/modules/gui/macosx/prefs_widgets.m
@@ -1395,7 +1395,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 
 -(void)resetValues
 {
-    [o_textfield setIntValue: config_GetInt(getIntf(), self.p_item->psz_name)];
+    [o_textfield setIntValue: config_GetInt(self.p_item->psz_name)];
     [super resetValues];
 }
 
@@ -1471,7 +1471,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 {
     [o_popup removeAllItems];
 
-    int i_current_selection = config_GetInt(getIntf(), self.p_item->psz_name);
+    int i_current_selection = config_GetInt(self.p_item->psz_name);
     int64_t *values;
     char **texts;
     ssize_t count = config_GetIntChoices(VLC_OBJECT(getIntf()), self.p_item->psz_name, &values, &texts);
@@ -1596,7 +1596,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 
 - (void)resetValues
 {
-    int value = config_GetInt(getIntf(), self.p_item->psz_name);
+    int value = config_GetInt(self.p_item->psz_name);
     [o_textfield setIntValue:value];
     [o_slider setIntValue:value];
     [super resetValues];
@@ -1846,7 +1846,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 
 - (void)resetValues
 {
-    [o_checkbox setState: config_GetInt(getIntf(), self.p_item->psz_name)];
+    [o_checkbox setState: config_GetInt(self.p_item->psz_name)];
     [super resetValues];
 }
 @end
@@ -1925,7 +1925,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 
 - (void)resetValues
 {
-    [o_popup selectItem:[[o_popup menu] itemWithTag:config_GetInt(getIntf(), self.p_item->psz_name)]];
+    [o_popup selectItem:[[o_popup menu] itemWithTag:config_GetInt(self.p_item->psz_name)]];
     [super resetValues];
 }
 @end
diff --git a/modules/gui/qt/components/simple_preferences.cpp b/modules/gui/qt/components/simple_preferences.cpp
index 635cc274c0..cc05135325 100644
--- a/modules/gui/qt/components/simple_preferences.cpp
+++ b/modules/gui/qt/components/simple_preferences.cpp
@@ -518,7 +518,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
 #undef audioControl
 #undef audioCommon
 
-            int i_max_volume = config_GetInt( p_intf, "qt-max-volume" );
+            int i_max_volume = config_GetInt( "qt-max-volume" );
 
             /* Audio Options */
             ui.volumeValue->setMaximum( i_max_volume );
@@ -691,10 +691,10 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
 
 #define TestCaC( name, factor ) \
     b_cache_equal =  b_cache_equal && \
-     ( i_cache * factor == config_GetInt( p_intf, name ) );
+     ( i_cache * factor == config_GetInt( name ) );
             /* Select the accurate value of the ComboBox */
             bool b_cache_equal = true;
-            int i_cache = config_GetInt( p_intf, "file-caching" );
+            int i_cache = config_GetInt( "file-caching" );
 
             TestCaC( "network-caching", 10/3 );
             TestCaC( "disc-caching", 1);
@@ -878,8 +878,8 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
 
             CONFIG_GENERIC_NO_BOOL( "sub-margin", Integer, ui.subsPosLabel, subsPosition );
 
-            ui.shadowCheck->setChecked( config_GetInt( p_intf, "freetype-shadow-opacity" ) > 0 );
-            ui.backgroundCheck->setChecked( config_GetInt( p_intf, "freetype-background-opacity" ) > 0 );
+            ui.shadowCheck->setChecked( config_GetInt( "freetype-shadow-opacity" ) > 0 );
+            ui.backgroundCheck->setChecked( config_GetInt( "freetype-background-opacity" ) > 0 );
             optionWidgets["shadowCB"] = ui.shadowCheck;
             optionWidgets["backgroundCB"] = ui.backgroundCheck;
 
@@ -1006,7 +1006,7 @@ void SPrefsPanel::updateAudioOptions( int number)
     bool save = true;
 
     if (volume >= 0)
-        save = config_GetInt(VLC_OBJECT(p_intf), "volume-save");
+        save = config_GetInt("volume-save");
 
     QCheckBox *resetVolumeCheckBox =
         qobject_cast<QCheckBox *>(optionWidgets["resetVolumeCheckbox"]);
@@ -1153,7 +1153,7 @@ void SPrefsPanel::apply()
     case SPrefsSubtitles:
     {
         bool b_checked = qobject_cast<QCheckBox *>(optionWidgets["shadowCB"])->isChecked();
-        if( b_checked && config_GetInt( p_intf, "freetype-shadow-opacity" ) == 0 ) {
+        if( b_checked && config_GetInt( "freetype-shadow-opacity" ) == 0 ) {
             config_PutInt( p_intf, "freetype-shadow-opacity", 128 );
         }
         else if (!b_checked ) {
@@ -1161,7 +1161,7 @@ void SPrefsPanel::apply()
         }
 
         b_checked = qobject_cast<QCheckBox *>(optionWidgets["backgroundCB"])->isChecked();
-        if( b_checked && config_GetInt( p_intf, "freetype-background-opacity" ) == 0 ) {
+        if( b_checked && config_GetInt( "freetype-background-opacity" ) == 0 ) {
             config_PutInt( p_intf, "freetype-background-opacity", 128 );
         }
         else if (!b_checked ) {
diff --git a/modules/lua/libs/configuration.c b/modules/lua/libs/configuration.c
index bbb200527c..030f13897e 100644
--- a/modules/lua/libs/configuration.c
+++ b/modules/lua/libs/configuration.c
@@ -55,11 +55,11 @@ static int vlclua_config_get( lua_State *L )
         }
 
         case VLC_VAR_INTEGER:
-            lua_pushinteger( L, config_GetInt( p_this, psz_name ) );
+            lua_pushinteger( L, config_GetInt( psz_name ) );
             break;
 
         case VLC_VAR_BOOL:
-            lua_pushboolean( L, config_GetInt( p_this, psz_name ) );
+            lua_pushboolean( L, config_GetInt( psz_name ) );
             break;
 
         case VLC_VAR_FLOAT:
diff --git a/src/config/core.c b/src/config/core.c
index 255f3c7ab8..b7020a0eb1 100644
--- a/src/config/core.c
+++ b/src/config/core.c
@@ -77,8 +77,7 @@ bool config_IsSafe( const char *name )
     return p_config != NULL && p_config->b_safe;
 }
 
-#undef config_GetInt
-int64_t config_GetInt( vlc_object_t *p_this, const char *psz_name )
+int64_t config_GetInt(const char *psz_name)
 {
     module_config_t *p_config = config_FindConfig( psz_name );
 
diff --git a/src/misc/variables.c b/src/misc/variables.c
index 810c8ffc81..704091ff4e 100644
--- a/src/misc/variables.c
+++ b/src/misc/variables.c
@@ -1191,10 +1191,10 @@ int var_Inherit( vlc_object_t *p_this, const char *psz_name, int i_type,
             p_val->f_float = config_GetFloat( p_this, psz_name );
             break;
         case VLC_VAR_INTEGER:
-            p_val->i_int = config_GetInt( p_this, psz_name );
+            p_val->i_int = config_GetInt( psz_name );
             break;
         case VLC_VAR_BOOL:
-            p_val->b_bool = config_GetInt( p_this, psz_name ) > 0;
+            p_val->b_bool = config_GetInt( psz_name ) > 0;
             break;
         default:
             vlc_assert_unreachable();



More information about the vlc-commits mailing list