Skip to content

Commit f0ba2aa

Browse files
committed
Fix channel
1 parent b31f06a commit f0ba2aa

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

src/MacVim/MMBackend.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3416,6 +3416,7 @@ @implementation MMChannel
34163416

34173417
- (void)dealloc
34183418
{
3419+
CFSocketInvalidate(socket);
34193420
CFRunLoopSourceInvalidate(runLoopSource);
34203421
CFRelease(runLoopSource);
34213422
CFRelease(socket);
@@ -3459,9 +3460,7 @@ - (id)initWithChannel:(channel_T *)c part:(int)p
34593460

34603461
- (void)read
34613462
{
3462-
#ifdef FEAT_CHANNEL
34633463
channel_read(channel, part, "MMChannel_read");
3464-
#endif
34653464
}
34663465

34673466
@end

src/channel.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@
5454
# define fd_close(sd) close(sd)
5555
#endif
5656

57+
#ifndef FEAT_GUI_MACVIM
5758
static void channel_read(channel_T *channel, int part, char *func);
59+
#endif
5860

5961
/* Whether a redraw is needed for appending a line to a buffer. */
6062
static int channel_need_redraw = FALSE;
@@ -2824,7 +2826,11 @@ channel_close_on_error(channel_T *channel, char *func)
28242826
* "part" is PART_SOCK, PART_OUT or PART_ERR.
28252827
* The data is put in the read queue.
28262828
*/
2829+
#ifndef FEAT_GUI_MACVIM
28272830
static void
2831+
#else
2832+
void
2833+
#endif
28282834
channel_read(channel_T *channel, int part, char *func)
28292835
{
28302836
static char_u *buf = NULL;

src/proto/channel.pro

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,7 @@ job_T *job_start(typval_T *argvars);
6060
char *job_status(job_T *job);
6161
void job_info(job_T *job, dict_T *dict);
6262
int job_stop(job_T *job, typval_T *argvars);
63+
#ifdef FEAT_GUI_MACVIM
64+
void channel_read(channel_T *channel, int part, char *func);
65+
#endif
6366
/* vim: set ft=c : */

0 commit comments

Comments
 (0)