mirror of
https://github.com/vim/vim.git
synced 2025-11-13 22:54:27 -05:00
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>
This commit is contained in:
committed by
Christian Brabandt
parent
84baba329a
commit
24e4fa1603
@@ -386,7 +386,7 @@ timer_delete(timer_t timerid)
|
|||||||
|
|
||||||
#ifdef FEAT_SOUND
|
#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
|
/// A delegate for handling when a sound has stopped playing, in
|
||||||
/// order to clean up the sound and to send a callback.
|
/// 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)
|
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
|
// Make a delegate to handle when the sound stops. No need to call
|
||||||
// autorelease because NSSound only holds a weak reference to it.
|
// autorelease because NSSound only holds a weak reference to it.
|
||||||
@@ -482,7 +482,7 @@ sound_mch_stop(long sound_id)
|
|||||||
{
|
{
|
||||||
@autoreleasepool
|
@autoreleasepool
|
||||||
{
|
{
|
||||||
NSSound *sound = sounds_list[[NSNumber numberWithLong:sound_id]];
|
NSSound *sound = [sounds_list objectForKey:[NSNumber numberWithLong:sound_id]];
|
||||||
if (sound != nil)
|
if (sound != nil)
|
||||||
{
|
{
|
||||||
// Stop the sound. No need to release it because the delegate will do
|
// Stop the sound. No need to release it because the delegate will do
|
||||||
|
|||||||
@@ -729,6 +729,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1897,
|
||||||
/**/
|
/**/
|
||||||
1896,
|
1896,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user