Skip to content

Commit e10d94b

Browse files
committed
Rename screendata.stdscr to stdscr_value to avoid a conflict on Cygwin
Fixes #117.
1 parent b23b169 commit e10d94b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ext/curses/curses.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1696,7 +1696,7 @@ curses_reset_prog_mode(VALUE obj)
16961696

16971697
struct screendata {
16981698
SCREEN *screen;
1699-
VALUE stdscr;
1699+
VALUE stdscr_value;
17001700
};
17011701

17021702
NORETURN(static void no_screen(void));
@@ -1716,7 +1716,7 @@ screen_gc_mark(void *p)
17161716
{
17171717
struct screendata *screenp = p;
17181718

1719-
rb_gc_mark(screenp->stdscr);
1719+
rb_gc_mark(screenp->stdscr_value);
17201720
}
17211721

17221722
static void
@@ -1777,7 +1777,7 @@ screen_initialize(int argc, VALUE *argv, VALUE obj)
17771777
screenp->screen = newterm(NIL_P(type) ? NULL : StringValueCStr(type),
17781778
rb_io_stdio_file(outfptr),
17791779
rb_io_stdio_file(infptr));
1780-
screenp->stdscr = Qnil;
1780+
screenp->stdscr_value = Qnil;
17811781

17821782
return obj;
17831783
}
@@ -1795,10 +1795,10 @@ screen_set_term(VALUE obj)
17951795

17961796
GetSCREEN(obj, screenp);
17971797
set_term(screenp->screen);
1798-
if (NIL_P(screenp->stdscr)) {
1799-
screenp->stdscr = prep_window(cWindow, stdscr, 1);
1798+
if (NIL_P(screenp->stdscr_value)) {
1799+
screenp->stdscr_value = prep_window(cWindow, stdscr, 1);
18001800
}
1801-
rb_stdscr = screenp->stdscr;
1801+
rb_stdscr = screenp->stdscr_value;
18021802

18031803
return Qnil;
18041804
}

0 commit comments

Comments
 (0)