wok diff ruby-ncurses/stuff/STR2CSTR-deprecated.patch @ rev 22340

Add perl-netaddr-ip & spamassassin
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Nov 15 23:13:17 2019 +0100 (2019-11-15)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/ruby-ncurses/stuff/STR2CSTR-deprecated.patch	Fri Nov 15 23:13:17 2019 +0100
     1.3 @@ -0,0 +1,320 @@
     1.4 +diff -Naur ncurses-ruby-1.3.1/form_wrap.c ncurses-ruby-1.3.1.p/form_wrap.c
     1.5 +--- ncurses-ruby-1.3.1/form_wrap.c	2011-05-31 01:41:46.000000000 +0200
     1.6 ++++ ncurses-ruby-1.3.1.p/form_wrap.c	2013-03-14 14:38:21.097682379 +0100
     1.7 +@@ -625,7 +625,8 @@
     1.8 + 		char** list = ALLOC_N(char*, n+1);
     1.9 + 		int i;
    1.10 + 		for (i = 0; i < n; i++) {
    1.11 +-		  list[i] = STR2CSTR(rb_ary_entry(arg3, (long)i));
    1.12 ++		  VALUE tmp = rb_ary_entry(arg3, (long)i);
    1.13 ++		  list[i] = StringValuePtr(tmp);
    1.14 + 		}
    1.15 + 		list[n] = NULL;
    1.16 + 		return INT2NUM(set_field_type(field, ftype, 
    1.17 +@@ -654,7 +655,7 @@
    1.18 + 	 if (argc != 2)
    1.19 + 		rb_raise(rb_eArgError, "TYPE_REGEXP requires one additional argument");
    1.20 + 	 return INT2NUM(set_field_type(field, ftype, 
    1.21 +-											 STR2CSTR(arg3)));
    1.22 ++											 StringValuePtr(arg3)));
    1.23 +   }
    1.24 +   else if (ftype == TYPE_IPV4){	
    1.25 + 	 if (argc != 1)
    1.26 +@@ -742,7 +743,7 @@
    1.27 +  */
    1.28 + static VALUE rbncurs_c_set_field_buffer(VALUE rb_field, VALUE buf, VALUE value) {
    1.29 +   FIELD* field = get_field(rb_field);
    1.30 +-  return INT2NUM(set_field_buffer(field, NUM2INT(buf), STR2CSTR(value)));
    1.31 ++  return INT2NUM(set_field_buffer(field, NUM2INT(buf), StringValuePtr(value)));
    1.32 + }
    1.33 + static VALUE rbncurs_m_set_field_buffer(VALUE dummy, VALUE rb_field, VALUE buf, VALUE value)
    1.34 + { return rbncurs_c_set_field_buffer(rb_field, buf, value); }
    1.35 +@@ -1052,7 +1053,7 @@
    1.36 + { return rbncurs_c_form_request_name(request); }
    1.37 + 
    1.38 + static VALUE rbncurs_c_form_request_by_name(VALUE name) {
    1.39 +-  return INT2NUM(form_request_by_name(STR2CSTR(name)));
    1.40 ++  return INT2NUM(form_request_by_name(StringValuePtr(name)));
    1.41 + }
    1.42 + static VALUE rbncurs_m_form_request_by_name(VALUE dummy, VALUE name)
    1.43 + { return rbncurs_c_form_request_by_name(name); }
    1.44 +diff -Naur ncurses-ruby-1.3.1/menu_wrap.c ncurses-ruby-1.3.1.p/menu_wrap.c
    1.45 +--- ncurses-ruby-1.3.1/menu_wrap.c	2011-05-31 01:41:46.000000000 +0200
    1.46 ++++ ncurses-ruby-1.3.1.p/menu_wrap.c	2013-03-14 14:39:37.016571464 +0100
    1.47 +@@ -372,7 +372,7 @@
    1.48 +  * Item creation/destruction functions - mitem_new(3X) man page
    1.49 +  */
    1.50 + static VALUE rbncurs_m_new_item(VALUE dummy, VALUE name, VALUE description)
    1.51 +-{ return wrap_item(new_item(STR2CSTR(name), STR2CSTR(description))); }
    1.52 ++{ return wrap_item(new_item(StringValuePtr(name), StringValuePtr(description))); }
    1.53 + 
    1.54 + static VALUE rbncurs_c_free_item(VALUE rb_item)
    1.55 + {
    1.56 +@@ -670,7 +670,7 @@
    1.57 + 
    1.58 + static VALUE rbncurs_c_menu_request_by_name(VALUE name)
    1.59 + {
    1.60 +-  return INT2NUM(menu_request_by_name(STR2CSTR(name)));
    1.61 ++  return INT2NUM(menu_request_by_name(StringValuePtr(name)));
    1.62 + }
    1.63 + static VALUE rbncurs_m_menu_request_by_name(VALUE dummy, VALUE name)
    1.64 + { return rbncurs_c_menu_request_by_name(name); }
    1.65 +@@ -909,7 +909,7 @@
    1.66 + static VALUE rbncurs_c_set_menu_mark(VALUE rb_menu, VALUE value)
    1.67 + {
    1.68 +   MENU *menu = get_menu(rb_menu);
    1.69 +-  return INT2NUM(set_menu_mark(menu, STR2CSTR(value)));
    1.70 ++  return INT2NUM(set_menu_mark(menu, StringValuePtr(value)));
    1.71 + }
    1.72 + static VALUE rbncurs_m_set_menu_mark(VALUE dummy, VALUE rb_field, VALUE value)
    1.73 + { return rbncurs_c_set_menu_mark(rb_field, value); }
    1.74 +@@ -929,7 +929,7 @@
    1.75 + static VALUE rbncurs_c_set_menu_pattern(VALUE rb_menu, VALUE pattern)
    1.76 + {
    1.77 +   MENU *menu = get_menu(rb_menu);
    1.78 +-  return INT2NUM(set_menu_pattern(menu, STR2CSTR(pattern)));
    1.79 ++  return INT2NUM(set_menu_pattern(menu, StringValuePtr(pattern)));
    1.80 + }
    1.81 + static VALUE rbncurs_m_set_menu_pattern(VALUE dummy, VALUE rb_menu, VALUE pattern)
    1.82 + { return rbncurs_c_set_menu_pattern(rb_menu, pattern); }
    1.83 +diff -Naur ncurses-ruby-1.3.1/ncurses_wrap.c ncurses-ruby-1.3.1.p/ncurses_wrap.c
    1.84 +--- ncurses-ruby-1.3.1/ncurses_wrap.c	2011-05-31 01:41:46.000000000 +0200
    1.85 ++++ ncurses-ruby-1.3.1.p/ncurses_wrap.c	2013-03-14 15:09:59.535783327 +0100
    1.86 +@@ -475,7 +475,7 @@
    1.87 + static VALUE rbncurs_define_key(VALUE dummy, VALUE definition, VALUE keycode)
    1.88 + {
    1.89 +     return INT2NUM(define_key((definition != Qnil)
    1.90 +-                              ? STR2CSTR(definition)
    1.91 ++                              ? StringValuePtr(definition)
    1.92 +                               : (char*)(NULL),
    1.93 +                               NUM2INT(keycode)));
    1.94 + }
    1.95 +@@ -580,10 +580,10 @@
    1.96 +     return return_value;
    1.97 + }
    1.98 + static VALUE rbncurs_addnstr(VALUE dummy, VALUE arg1, VALUE arg2) {
    1.99 +-    return INT2NUM(addnstr(STR2CSTR(arg1),  NUM2INT(arg2)));
   1.100 ++    return INT2NUM(addnstr(StringValuePtr(arg1),  NUM2INT(arg2)));
   1.101 + }
   1.102 + static VALUE rbncurs_addstr(VALUE dummy, VALUE arg1) {
   1.103 +-    return INT2NUM(addstr(STR2CSTR(arg1)));
   1.104 ++    return INT2NUM(addstr(StringValuePtr(arg1)));
   1.105 + }
   1.106 + static VALUE rbncurs_attroff(VALUE dummy, VALUE arg1) {
   1.107 +     return INT2NUM(attroff(NUM2ULONG(arg1)));
   1.108 +@@ -1011,10 +1011,10 @@
   1.109 +     return INT2NUM(insertln());
   1.110 + }
   1.111 + static VALUE rbncurs_insnstr(VALUE dummy, VALUE arg1, VALUE arg2) {
   1.112 +-    return INT2NUM(insnstr(STR2CSTR(arg1),  NUM2INT(arg2)));
   1.113 ++    return INT2NUM(insnstr(StringValuePtr(arg1),  NUM2INT(arg2)));
   1.114 + }
   1.115 + static VALUE rbncurs_insstr(VALUE dummy, VALUE arg1) {
   1.116 +-    return INT2NUM(insstr(STR2CSTR(arg1)));
   1.117 ++    return INT2NUM(insstr(StringValuePtr(arg1)));
   1.118 + }
   1.119 + #ifdef HAVE_INTRFLUSH
   1.120 + static VALUE rbncurs_intrflush(VALUE dummy, VALUE arg1, VALUE arg2) {
   1.121 +@@ -1070,10 +1070,10 @@
   1.122 +     return return_value;
   1.123 + }
   1.124 + static VALUE rbncurs_mvaddnstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4) {
   1.125 +-    return INT2NUM(mvaddnstr(NUM2INT(arg1),  NUM2INT(arg2),  STR2CSTR(arg3),  NUM2INT(arg4)));
   1.126 ++    return INT2NUM(mvaddnstr(NUM2INT(arg1),  NUM2INT(arg2),  StringValuePtr(arg3),  NUM2INT(arg4)));
   1.127 + }
   1.128 + static VALUE rbncurs_mvaddstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3) {
   1.129 +-    return INT2NUM(mvaddstr(NUM2INT(arg1),  NUM2INT(arg2),  STR2CSTR(arg3)));
   1.130 ++    return INT2NUM(mvaddstr(NUM2INT(arg1),  NUM2INT(arg2),  StringValuePtr(arg3)));
   1.131 + }
   1.132 + #ifdef HAVE_MVCHGAT
   1.133 + static VALUE rbncurs_mvchgat(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4, VALUE arg5, VALUE arg6) {
   1.134 +@@ -1106,10 +1106,10 @@
   1.135 +     return INT2NUM(mvinsch(NUM2INT(arg1),  NUM2INT(arg2),  NUM2ULONG(arg3)));
   1.136 + }
   1.137 + static VALUE rbncurs_mvinsnstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4) {
   1.138 +-    return INT2NUM(mvinsnstr(NUM2INT(arg1),  NUM2INT(arg2),  STR2CSTR(arg3),  NUM2INT(arg4)));
   1.139 ++    return INT2NUM(mvinsnstr(NUM2INT(arg1),  NUM2INT(arg2),  StringValuePtr(arg3),  NUM2INT(arg4)));
   1.140 + }
   1.141 + static VALUE rbncurs_mvinsstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3) {
   1.142 +-    return INT2NUM(mvinsstr(NUM2INT(arg1),  NUM2INT(arg2),  STR2CSTR(arg3)));
   1.143 ++    return INT2NUM(mvinsstr(NUM2INT(arg1),  NUM2INT(arg2),  StringValuePtr(arg3)));
   1.144 + }
   1.145 + #ifdef HAVE_MVVLINE
   1.146 + static VALUE rbncurs_mvvline(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4) {
   1.147 +@@ -1137,10 +1137,10 @@
   1.148 +     return return_value;
   1.149 + }
   1.150 + static VALUE rbncurs_mvwaddnstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4, VALUE arg5) {
   1.151 +-    return INT2NUM(mvwaddnstr(get_window(arg1),  NUM2INT(arg2),  NUM2INT(arg3),  STR2CSTR(arg4),  NUM2INT(arg5)));
   1.152 ++    return INT2NUM(mvwaddnstr(get_window(arg1),  NUM2INT(arg2),  NUM2INT(arg3),  StringValuePtr(arg4),  NUM2INT(arg5)));
   1.153 + }
   1.154 + static VALUE rbncurs_mvwaddstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4) {
   1.155 +-    return INT2NUM(mvwaddstr(get_window(arg1),  NUM2INT(arg2),  NUM2INT(arg3),  STR2CSTR(arg4)));
   1.156 ++    return INT2NUM(mvwaddstr(get_window(arg1),  NUM2INT(arg2),  NUM2INT(arg3),  StringValuePtr(arg4)));
   1.157 + }
   1.158 + #ifdef HAVE_MVWCHGAT
   1.159 + static VALUE rbncurs_mvwchgat(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4, VALUE arg5, VALUE arg6, VALUE arg7) {
   1.160 +@@ -1171,10 +1171,10 @@
   1.161 +     return INT2NUM(mvwinsch(get_window(arg1),  NUM2INT(arg2),  NUM2INT(arg3),  NUM2ULONG(arg4)));
   1.162 + }
   1.163 + static VALUE rbncurs_mvwinsnstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4, VALUE arg5) {
   1.164 +-    return INT2NUM(mvwinsnstr(get_window(arg1),  NUM2INT(arg2),  NUM2INT(arg3),  STR2CSTR(arg4),  NUM2INT(arg5)));
   1.165 ++    return INT2NUM(mvwinsnstr(get_window(arg1),  NUM2INT(arg2),  NUM2INT(arg3),  StringValuePtr(arg4),  NUM2INT(arg5)));
   1.166 + }
   1.167 + static VALUE rbncurs_mvwinsstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4) {
   1.168 +-    return INT2NUM(mvwinsstr(get_window(arg1),  NUM2INT(arg2),  NUM2INT(arg3),  STR2CSTR(arg4)));
   1.169 ++    return INT2NUM(mvwinsstr(get_window(arg1),  NUM2INT(arg2),  NUM2INT(arg3),  StringValuePtr(arg4)));
   1.170 + }
   1.171 + #ifdef HAVE_MVWVLINE
   1.172 + static VALUE rbncurs_mvwvline(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4, VALUE arg5) {
   1.173 +@@ -1238,7 +1238,7 @@
   1.174 + }
   1.175 + #ifdef HAVE_PUTP
   1.176 + static VALUE rbncurs_putp(VALUE dummy, VALUE arg1) {
   1.177 +-    return INT2NUM(putp(STR2CSTR(arg1)));
   1.178 ++    return INT2NUM(putp(StringValuePtr(arg1)));
   1.179 + }
   1.180 + #endif
   1.181 + #ifdef HAVE_QIFLUSH
   1.182 +@@ -1271,12 +1271,12 @@
   1.183 + }
   1.184 + #ifdef HAVE_SCR_DUMP
   1.185 + static VALUE rbncurs_scr_dump(VALUE dummy, VALUE arg1) {
   1.186 +-    return INT2NUM(scr_dump(STR2CSTR(arg1)));
   1.187 ++    return INT2NUM(scr_dump(StringValuePtr(arg1)));
   1.188 + }
   1.189 + #endif
   1.190 + #ifdef HAVE_SCR_INIT
   1.191 + static VALUE rbncurs_scr_init(VALUE dummy, VALUE arg1) {
   1.192 +-    return INT2NUM(scr_init(STR2CSTR(arg1)));
   1.193 ++    return INT2NUM(scr_init(StringValuePtr(arg1)));
   1.194 + }
   1.195 + #endif
   1.196 + static VALUE rbncurs_scrl(VALUE dummy, VALUE arg1) {
   1.197 +@@ -1290,12 +1290,12 @@
   1.198 + }
   1.199 + #ifdef HAVE_SCR_RESTORE
   1.200 + static VALUE rbncurs_scr_restore(VALUE dummy, VALUE arg1) {
   1.201 +-    return INT2NUM(scr_restore(STR2CSTR(arg1)));
   1.202 ++    return INT2NUM(scr_restore(StringValuePtr(arg1)));
   1.203 + }
   1.204 + #endif
   1.205 + #ifdef HAVE_SCR_SET
   1.206 + static VALUE rbncurs_scr_set(VALUE dummy, VALUE arg1) {
   1.207 +-    return INT2NUM(scr_set(STR2CSTR(arg1)));
   1.208 ++    return INT2NUM(scr_set(StringValuePtr(arg1)));
   1.209 + }
   1.210 + #endif
   1.211 + static VALUE rbncurs_setscrreg(VALUE dummy, VALUE arg1, VALUE arg2) {
   1.212 +@@ -1352,7 +1352,7 @@
   1.213 +     return INT2NUM(slk_restore());
   1.214 + }
   1.215 + static VALUE rbncurs_slk_set(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3) {
   1.216 +-    return INT2NUM(slk_set(NUM2INT(arg1),  STR2CSTR(arg2),  NUM2INT(arg3)));
   1.217 ++    return INT2NUM(slk_set(NUM2INT(arg1),  StringValuePtr(arg2),  NUM2INT(arg3)));
   1.218 + }
   1.219 + static VALUE rbncurs_slk_touch(VALUE dummy) {
   1.220 +     return INT2NUM(slk_touch());
   1.221 +@@ -1383,17 +1383,17 @@
   1.222 + }
   1.223 + #ifdef HAVE_TIGETFLAG
   1.224 + static VALUE rbncurs_tigetflag(VALUE dummy, VALUE arg1) {
   1.225 +-    return INT2NUM(tigetflag(STR2CSTR(arg1)));
   1.226 ++    return INT2NUM(tigetflag(StringValuePtr(arg1)));
   1.227 + }
   1.228 + #endif
   1.229 + #ifdef HAVE_TIGETNUM
   1.230 + static VALUE rbncurs_tigetnum(VALUE dummy, VALUE arg1) {
   1.231 +-    return INT2NUM(tigetnum(STR2CSTR(arg1)));
   1.232 ++    return INT2NUM(tigetnum(StringValuePtr(arg1)));
   1.233 + }
   1.234 + #endif
   1.235 + #ifdef HAVE_TIGETSTR
   1.236 + static VALUE rbncurs_tigetstr(VALUE dummy, VALUE arg1) {
   1.237 +-    return rb_str_new2(tigetstr(STR2CSTR(arg1)));
   1.238 ++    return rb_str_new2(tigetstr(StringValuePtr(arg1)));
   1.239 + }
   1.240 + #endif
   1.241 + static VALUE rbncurs_timeout(VALUE dummy, VALUE arg1) {
   1.242 +@@ -1438,10 +1438,10 @@
   1.243 +     return return_value;
   1.244 + }
   1.245 + static VALUE rbncurs_waddnstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3) {
   1.246 +-    return INT2NUM(waddnstr(get_window(arg1),  STR2CSTR(arg2),  NUM2INT(arg3)));
   1.247 ++    return INT2NUM(waddnstr(get_window(arg1),  StringValuePtr(arg2),  NUM2INT(arg3)));
   1.248 + }
   1.249 + static VALUE rbncurs_waddstr(VALUE dummy, VALUE arg1, VALUE arg2) {
   1.250 +-    return INT2NUM(waddstr(get_window(arg1),  STR2CSTR(arg2)));
   1.251 ++    return INT2NUM(waddstr(get_window(arg1),  StringValuePtr(arg2)));
   1.252 + }
   1.253 + static VALUE rbncurs_wattron(VALUE dummy, VALUE arg1, VALUE arg2) {
   1.254 +     return INT2NUM(wattron(get_window(arg1),  NUM2INT(arg2)));
   1.255 +@@ -1514,10 +1514,10 @@
   1.256 +     return INT2NUM(winsertln(get_window(arg1)));
   1.257 + }
   1.258 + static VALUE rbncurs_winsnstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3) {
   1.259 +-    return INT2NUM(winsnstr(get_window(arg1),  STR2CSTR(arg2),  NUM2INT(arg3)));
   1.260 ++    return INT2NUM(winsnstr(get_window(arg1),  StringValuePtr(arg2),  NUM2INT(arg3)));
   1.261 + }
   1.262 + static VALUE rbncurs_winsstr(VALUE dummy, VALUE arg1, VALUE arg2) {
   1.263 +-    return INT2NUM(winsstr(get_window(arg1),  STR2CSTR(arg2)));
   1.264 ++    return INT2NUM(winsstr(get_window(arg1),  StringValuePtr(arg2)));
   1.265 + }
   1.266 + static VALUE rbncurs_wmove(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3) {
   1.267 +     return INT2NUM(wmove(get_window(arg1),  NUM2INT(arg2),  NUM2INT(arg3)));
   1.268 +@@ -1619,7 +1619,7 @@
   1.269 + { return rb_str_new2(unctrl(NUM2ULONG(ch))); }
   1.270 + static VALUE rbncurs_newterm(VALUE dummy, VALUE rb_type, VALUE rb_outfd, VALUE rb_infd)
   1.271 + {
   1.272 +-    char * type = (rb_type == Qnil) ? (char*)0 : STR2CSTR(rb_type);
   1.273 ++    char * type = (rb_type == Qnil) ? (char*)0 : StringValuePtr(rb_type);
   1.274 +     int outfd = NUM2INT(rb_funcall(rb_outfd, rb_intern("to_i"), 0));
   1.275 +     int infd  = NUM2INT(rb_funcall(rb_infd, rb_intern("to_i"), 0));
   1.276 +     VALUE rb_screen =
   1.277 +@@ -2277,7 +2277,7 @@
   1.278 + #ifdef HAVE_MCPRINT
   1.279 + static VALUE rbncurs_mcprint(VALUE dummy, VALUE data, VALUE len)
   1.280 + {
   1.281 +-    return INT2NUM(mcprint(STR2CSTR(data), NUM2INT(len)));
   1.282 ++    return INT2NUM(mcprint(StringValuePtr(data), NUM2INT(len)));
   1.283 + }
   1.284 + #endif
   1.285 + #ifdef HAVE_HAS_KEY
   1.286 +@@ -2378,9 +2378,9 @@
   1.287 +                  " and a String");
   1.288 +         return Qnil;
   1.289 +     }
   1.290 ++	VALUE tmp = rb_funcall3(rb_mKernel, rb_intern("sprintf"), argc-1, argv + 1);
   1.291 +     wprintw(get_window(argv[0]), "%s",
   1.292 +-            STR2CSTR(rb_funcall3(rb_mKernel, rb_intern("sprintf"), argc-1,
   1.293 +-                              argv + 1)));
   1.294 ++		StringValuePtr(tmp));
   1.295 +     return Qnil;
   1.296 + }
   1.297 + 
   1.298 +@@ -2394,14 +2394,14 @@
   1.299 +         return Qnil;
   1.300 +     }
   1.301 +     _tracef("%s",
   1.302 +-            STR2CSTR(rb_funcall3(rb_mKernel, rb_intern("sprintf"), argc, argv)));
   1.303 ++            StringValuePtr(funcall3(rb_mKernel, rb_intern("sprintf"), argc, argv)));
   1.304 +     return Qnil;
   1.305 + }
   1.306 + #endif /* HAVE__TRACEF */
   1.307 + #ifdef HAVE__TRACEDUMP
   1.308 + static VALUE rbncurs_tracedump(VALUE dummy, VALUE rb_label, VALUE rb_win)
   1.309 + {
   1.310 +-    _tracedump(STR2CSTR(rb_label), get_window(rb_win));
   1.311 ++    _tracedump(StringValuePtr(rb_label), get_window(rb_win));
   1.312 + }
   1.313 + #endif /* HAVE__TRACEDUMP */
   1.314 + #ifdef HAVE__TRACEATTR
   1.315 +@@ -2706,7 +2706,7 @@
   1.316 + 
   1.317 + #ifdef HAVE_LOCALE_H
   1.318 + static VALUE rbncurs_setlocale(VALUE dummy, VALUE category, VALUE locale)
   1.319 +-{   return rb_str_new2(setlocale(NUM2INT(category), STR2CSTR(locale)));}
   1.320 ++{   return rb_str_new2(setlocale(NUM2INT(category), StringValuePtr(locale)));}
   1.321 + #endif
   1.322 + 
   1.323 + static void init_safe_functions(void)