From 24e4fa1603ff30d814c08a3516b092f012067732 Mon Sep 17 00:00:00 2001 From: Luke Lollard Date: Thu, 6 Nov 2025 20:04:38 +0000 Subject: [PATCH] patch 9.1.1897: Mac: Build failure on Mac OS X 10.6 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 Signed-off-by: Luke Lollard Signed-off-by: Christian Brabandt --- src/os_macosx.m | 8 ++++---- src/version.c | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/os_macosx.m b/src/os_macosx.m index 153c2f190c..1a633b9d6c 100644 --- a/src/os_macosx.m +++ b/src/os_macosx.m @@ -386,7 +386,7 @@ timer_delete(timer_t timerid) #ifdef FEAT_SOUND -static NSMutableDictionary *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 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 diff --git a/src/version.c b/src/version.c index ba48dda5a9..f69be10d20 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1897, /**/ 1896, /**/ -- 2.47.3