@@ -2970,8 +2970,6 @@ window_attr_set(VALUE obj, VALUE attrs, VALUE pair)
29702970 GetWINDOW (obj , winp );
29712971 return (wattr_set (winp -> window , NUM2UINT (attrs ), NUM2INT (pair ), NULL ) == OK ) ? Qtrue : Qfalse ;
29722972}
2973- #else
2974- #define window_attr_set rb_f_notimplement
29752973#endif
29762974
29772975/*
@@ -3003,8 +3001,6 @@ window_attr_get(VALUE obj)
30033001 return Qnil ;
30043002 return rb_ary_new3 (2 , UINT2NUM (attrs ), INT2NUM (pair ));
30053003}
3006- #else
3007- #define window_attr_get rb_f_notimplement
30083004#endif
30093005
30103006/*
@@ -5375,8 +5371,12 @@ Init_curses(void)
53755371 rb_define_method (cWindow , "attroff" , window_attroff , 1 );
53765372 rb_define_method (cWindow , "attron" , window_attron , 1 );
53775373 rb_define_method (cWindow , "attrset" , window_attrset , 1 );
5374+ #ifdef HAVE_WATTR_SET
53785375 rb_define_method (cWindow , "attr_set" , window_attr_set , 2 );
5376+ #endif
5377+ #ifdef HAVE_WATTR_GET
53795378 rb_define_method (cWindow , "attr_get" , window_attr_get , 0 );
5379+ #endif
53805380 rb_define_method (cWindow , "bkgdset" , window_bkgdset , 1 );
53815381 rb_define_method (cWindow , "bkgd" , window_bkgd , 1 );
53825382 rb_define_method (cWindow , "getbkgd" , window_getbkgd , 0 );
0 commit comments