Skip to content

Commit 24e4fa1

Browse files
haihigeychin
authored andcommitted
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 <ychin.git@gmail.com> Signed-off-by: Luke Lollard <haihige@protonmail.ch> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent 84baba3 commit 24e4fa1

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/os_macosx.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@
386386

387387
#ifdef FEAT_SOUND
388388

389-
static NSMutableDictionary<NSNumber*, NSSound*> *sounds_list = nil;
389+
static NSMutableDictionary *sounds_list = nil;
390390

391391
/// A delegate for handling when a sound has stopped playing, in
392392
/// order to clean up the sound and to send a callback.
@@ -463,9 +463,9 @@ - (void) sound:(NSSound *)sound didFinishPlaying:(BOOL)flag
463463

464464
if (sounds_list == nil)
465465
{
466-
sounds_list = [[NSMutableDictionary<NSNumber*, NSSound*> alloc] init];
466+
sounds_list = [[NSMutableDictionary alloc] init];
467467
}
468-
sounds_list[[NSNumber numberWithLong:sound_id]] = sound;
468+
[sounds_list setObject:sound forKey:[NSNumber numberWithLong:sound_id]];
469469

470470
// Make a delegate to handle when the sound stops. No need to call
471471
// autorelease because NSSound only holds a weak reference to it.
@@ -482,7 +482,7 @@ - (void) sound:(NSSound *)sound didFinishPlaying:(BOOL)flag
482482
{
483483
@autoreleasepool
484484
{
485-
NSSound *sound = sounds_list[[NSNumber numberWithLong:sound_id]];
485+
NSSound *sound = [sounds_list objectForKey:[NSNumber numberWithLong:sound_id]];
486486
if (sound != nil)
487487
{
488488
// Stop the sound. No need to release it because the delegate will do

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,8 @@ static char *(features[]) =
729729

730730
static int included_patches[] =
731731
{ /* Add new patch number below this line */
732+
/**/
733+
1897,
732734
/**/
733735
1896,
734736
/**/

0 commit comments

Comments
 (0)