@@ -1443,7 +1443,7 @@ curses_pair_content(VALUE obj, VALUE pair)
14431443static VALUE
14441444curses_color_pair (VALUE obj , VALUE attrs )
14451445{
1446- return INT2FIX (COLOR_PAIR (NUM2INT (attrs )));
1446+ return CHTYPE2NUM (COLOR_PAIR (NUM2CHTYPE (attrs )));
14471447}
14481448
14491449/*
@@ -1456,7 +1456,7 @@ static VALUE
14561456curses_pair_number (VALUE obj , VALUE attrs )
14571457{
14581458 curses_stdscr ();
1459- return INT2FIX (PAIR_NUMBER (NUM2LONG (attrs )));
1459+ return INT2FIX (PAIR_NUMBER (NUM2CHTYPE (attrs )));
14601460}
14611461#endif /* USE_COLOR */
14621462
@@ -2672,7 +2672,7 @@ window_attroff(VALUE obj, VALUE attrs)
26722672 struct windata * winp ;
26732673
26742674 GetWINDOW (obj ,winp );
2675- return INT2FIX (wattroff (winp -> window ,NUM2INT (attrs )));
2675+ return INT2FIX (wattroff (winp -> window ,NUM2CHTYPE (attrs )));
26762676#else
26772677 return Qtrue ;
26782678#endif
@@ -2695,10 +2695,10 @@ window_attron(VALUE obj, VALUE attrs)
26952695 VALUE val ;
26962696
26972697 GetWINDOW (obj ,winp );
2698- val = INT2FIX (wattron (winp -> window ,NUM2INT (attrs )));
2698+ val = INT2FIX (wattron (winp -> window ,NUM2CHTYPE (attrs )));
26992699 if (rb_block_given_p ()) {
27002700 rb_yield (val );
2701- wattroff (winp -> window ,NUM2INT (attrs ));
2701+ wattroff (winp -> window ,NUM2CHTYPE (attrs ));
27022702 return val ;
27032703 }
27042704 else {
@@ -2742,7 +2742,7 @@ window_attrset(VALUE obj, VALUE attrs)
27422742 struct windata * winp ;
27432743
27442744 GetWINDOW (obj ,winp );
2745- return INT2FIX (wattrset (winp -> window ,NUM2INT (attrs )));
2745+ return INT2FIX (wattrset (winp -> window ,NUM2CHTYPE (attrs )));
27462746#else
27472747 return Qtrue ;
27482748#endif
0 commit comments