Skip to content

Commit c408e11

Browse files
shugoclaude
andcommitted
Fix build on Windows/PDCurses: guard NCURSES_PAIRS_T
NCURSES_PAIRS_T is ncurses-specific and not defined in PDCurses. Fall back to short when it is not available. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 74eb758 commit c408e11

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/curses/curses.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2801,7 +2801,11 @@ window_color_set(VALUE obj, VALUE col)
28012801
/* Use wattr_set to support pair numbers > 255; preserve existing attrs. */
28022802
{
28032803
attr_t attrs;
2804+
#ifdef NCURSES_PAIRS_T
28042805
NCURSES_PAIRS_T current_pair;
2806+
#else
2807+
short current_pair;
2808+
#endif
28052809
if (wattr_get(winp->window, &attrs, &current_pair, NULL) == ERR)
28062810
return Qfalse;
28072811
return (wattr_set(winp->window, attrs, NUM2INT(col), NULL) == OK) ? Qtrue : Qfalse;

0 commit comments

Comments
 (0)