]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1897: Mac: Build failure on Mac OS X 10.6 v9.1.1897
authorLuke Lollard <haihige@protonmail.ch>
Thu, 6 Nov 2025 20:04:38 +0000 (20:04 +0000)
committerChristian Brabandt <cb@256bit.org>
Thu, 6 Nov 2025 20:04:38 +0000 (20:04 +0000)
Problem:  Mac: Build failure on Mac OS X 10.6 due to the use of generics
          for the sound feature.
Solution: Use the simple, non-generic Objective-C version.
          (Luke Lollard)

fixes: #17678
closes: #18681

Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Luke Lollard <haihige@protonmail.ch>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/os_macosx.m
src/version.c

index 153c2f190c21162ca6dd1634f60142c3e3519e36..1a633b9d6cff5ec344bf2b03daeb76c7a4aa0a35 100644 (file)
@@ -386,7 +386,7 @@ timer_delete(timer_t timerid)
 
 #ifdef FEAT_SOUND
 
-static NSMutableDictionary<NSNumber*, NSSound*> *sounds_list = nil;
+static NSMutableDictionary *sounds_list = nil;
 
 /// A delegate for handling when a sound has stopped playing, in
 /// order to clean up the sound and to send a callback.
@@ -463,9 +463,9 @@ sound_mch_play(const char_u* sound_name, long sound_id, soundcb_T *callback, boo
 
        if (sounds_list == nil)
        {
-           sounds_list = [[NSMutableDictionary<NSNumber*, NSSound*> alloc] init];
+           sounds_list = [[NSMutableDictionary alloc] init];
        }
-       sounds_list[[NSNumber numberWithLong:sound_id]] = sound;
+       [sounds_list setObject:sound forKey:[NSNumber numberWithLong:sound_id]];
 
        // Make a delegate to handle when the sound stops. No need to call
        // autorelease because NSSound only holds a weak reference to it.
@@ -482,7 +482,7 @@ sound_mch_stop(long sound_id)
 {
     @autoreleasepool
     {
-       NSSound *sound = sounds_list[[NSNumber numberWithLong:sound_id]];
+       NSSound *sound = [sounds_list objectForKey:[NSNumber numberWithLong:sound_id]];
        if (sound != nil)
        {
            // Stop the sound. No need to release it because the delegate will do
index ba48dda5a9bc86643b8da05bffe890cfe553a49f..f69be10d20c6c1f79f3d15daa717fb1efbe8b19f 100644 (file)
@@ -729,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1897,
 /**/
     1896,
 /**/