rev |
line source |
paul@16777
|
1 diff -Naur ncurses-ruby-1.3.1/form_wrap.c ncurses-ruby-1.3.1.p/form_wrap.c
|
paul@16777
|
2 --- ncurses-ruby-1.3.1/form_wrap.c 2011-05-31 01:41:46.000000000 +0200
|
paul@16777
|
3 +++ ncurses-ruby-1.3.1.p/form_wrap.c 2013-03-14 14:38:21.097682379 +0100
|
paul@16777
|
4 @@ -625,7 +625,8 @@
|
paul@16777
|
5 char** list = ALLOC_N(char*, n+1);
|
paul@16777
|
6 int i;
|
paul@16777
|
7 for (i = 0; i < n; i++) {
|
paul@16777
|
8 - list[i] = STR2CSTR(rb_ary_entry(arg3, (long)i));
|
paul@16777
|
9 + VALUE tmp = rb_ary_entry(arg3, (long)i);
|
paul@16777
|
10 + list[i] = StringValuePtr(tmp);
|
paul@16777
|
11 }
|
paul@16777
|
12 list[n] = NULL;
|
paul@16777
|
13 return INT2NUM(set_field_type(field, ftype,
|
paul@16777
|
14 @@ -654,7 +655,7 @@
|
paul@16777
|
15 if (argc != 2)
|
paul@16777
|
16 rb_raise(rb_eArgError, "TYPE_REGEXP requires one additional argument");
|
paul@16777
|
17 return INT2NUM(set_field_type(field, ftype,
|
paul@16777
|
18 - STR2CSTR(arg3)));
|
paul@16777
|
19 + StringValuePtr(arg3)));
|
paul@16777
|
20 }
|
paul@16777
|
21 else if (ftype == TYPE_IPV4){
|
paul@16777
|
22 if (argc != 1)
|
paul@16777
|
23 @@ -742,7 +743,7 @@
|
paul@16777
|
24 */
|
paul@16777
|
25 static VALUE rbncurs_c_set_field_buffer(VALUE rb_field, VALUE buf, VALUE value) {
|
paul@16777
|
26 FIELD* field = get_field(rb_field);
|
paul@16777
|
27 - return INT2NUM(set_field_buffer(field, NUM2INT(buf), STR2CSTR(value)));
|
paul@16777
|
28 + return INT2NUM(set_field_buffer(field, NUM2INT(buf), StringValuePtr(value)));
|
paul@16777
|
29 }
|
paul@16777
|
30 static VALUE rbncurs_m_set_field_buffer(VALUE dummy, VALUE rb_field, VALUE buf, VALUE value)
|
paul@16777
|
31 { return rbncurs_c_set_field_buffer(rb_field, buf, value); }
|
paul@16777
|
32 @@ -1052,7 +1053,7 @@
|
paul@16777
|
33 { return rbncurs_c_form_request_name(request); }
|
paul@16777
|
34
|
paul@16777
|
35 static VALUE rbncurs_c_form_request_by_name(VALUE name) {
|
paul@16777
|
36 - return INT2NUM(form_request_by_name(STR2CSTR(name)));
|
paul@16777
|
37 + return INT2NUM(form_request_by_name(StringValuePtr(name)));
|
paul@16777
|
38 }
|
paul@16777
|
39 static VALUE rbncurs_m_form_request_by_name(VALUE dummy, VALUE name)
|
paul@16777
|
40 { return rbncurs_c_form_request_by_name(name); }
|
paul@16777
|
41 diff -Naur ncurses-ruby-1.3.1/menu_wrap.c ncurses-ruby-1.3.1.p/menu_wrap.c
|
paul@16777
|
42 --- ncurses-ruby-1.3.1/menu_wrap.c 2011-05-31 01:41:46.000000000 +0200
|
paul@16777
|
43 +++ ncurses-ruby-1.3.1.p/menu_wrap.c 2013-03-14 14:39:37.016571464 +0100
|
paul@16777
|
44 @@ -372,7 +372,7 @@
|
paul@16777
|
45 * Item creation/destruction functions - mitem_new(3X) man page
|
paul@16777
|
46 */
|
paul@16777
|
47 static VALUE rbncurs_m_new_item(VALUE dummy, VALUE name, VALUE description)
|
paul@16777
|
48 -{ return wrap_item(new_item(STR2CSTR(name), STR2CSTR(description))); }
|
paul@16777
|
49 +{ return wrap_item(new_item(StringValuePtr(name), StringValuePtr(description))); }
|
paul@16777
|
50
|
paul@16777
|
51 static VALUE rbncurs_c_free_item(VALUE rb_item)
|
paul@16777
|
52 {
|
paul@16777
|
53 @@ -670,7 +670,7 @@
|
paul@16777
|
54
|
paul@16777
|
55 static VALUE rbncurs_c_menu_request_by_name(VALUE name)
|
paul@16777
|
56 {
|
paul@16777
|
57 - return INT2NUM(menu_request_by_name(STR2CSTR(name)));
|
paul@16777
|
58 + return INT2NUM(menu_request_by_name(StringValuePtr(name)));
|
paul@16777
|
59 }
|
paul@16777
|
60 static VALUE rbncurs_m_menu_request_by_name(VALUE dummy, VALUE name)
|
paul@16777
|
61 { return rbncurs_c_menu_request_by_name(name); }
|
paul@16777
|
62 @@ -909,7 +909,7 @@
|
paul@16777
|
63 static VALUE rbncurs_c_set_menu_mark(VALUE rb_menu, VALUE value)
|
paul@16777
|
64 {
|
paul@16777
|
65 MENU *menu = get_menu(rb_menu);
|
paul@16777
|
66 - return INT2NUM(set_menu_mark(menu, STR2CSTR(value)));
|
paul@16777
|
67 + return INT2NUM(set_menu_mark(menu, StringValuePtr(value)));
|
paul@16777
|
68 }
|
paul@16777
|
69 static VALUE rbncurs_m_set_menu_mark(VALUE dummy, VALUE rb_field, VALUE value)
|
paul@16777
|
70 { return rbncurs_c_set_menu_mark(rb_field, value); }
|
paul@16777
|
71 @@ -929,7 +929,7 @@
|
paul@16777
|
72 static VALUE rbncurs_c_set_menu_pattern(VALUE rb_menu, VALUE pattern)
|
paul@16777
|
73 {
|
paul@16777
|
74 MENU *menu = get_menu(rb_menu);
|
paul@16777
|
75 - return INT2NUM(set_menu_pattern(menu, STR2CSTR(pattern)));
|
paul@16777
|
76 + return INT2NUM(set_menu_pattern(menu, StringValuePtr(pattern)));
|
paul@16777
|
77 }
|
paul@16777
|
78 static VALUE rbncurs_m_set_menu_pattern(VALUE dummy, VALUE rb_menu, VALUE pattern)
|
paul@16777
|
79 { return rbncurs_c_set_menu_pattern(rb_menu, pattern); }
|
paul@16777
|
80 diff -Naur ncurses-ruby-1.3.1/ncurses_wrap.c ncurses-ruby-1.3.1.p/ncurses_wrap.c
|
paul@16777
|
81 --- ncurses-ruby-1.3.1/ncurses_wrap.c 2011-05-31 01:41:46.000000000 +0200
|
paul@16777
|
82 +++ ncurses-ruby-1.3.1.p/ncurses_wrap.c 2013-03-14 15:09:59.535783327 +0100
|
paul@16777
|
83 @@ -475,7 +475,7 @@
|
paul@16777
|
84 static VALUE rbncurs_define_key(VALUE dummy, VALUE definition, VALUE keycode)
|
paul@16777
|
85 {
|
paul@16777
|
86 return INT2NUM(define_key((definition != Qnil)
|
paul@16777
|
87 - ? STR2CSTR(definition)
|
paul@16777
|
88 + ? StringValuePtr(definition)
|
paul@16777
|
89 : (char*)(NULL),
|
paul@16777
|
90 NUM2INT(keycode)));
|
paul@16777
|
91 }
|
paul@16777
|
92 @@ -580,10 +580,10 @@
|
paul@16777
|
93 return return_value;
|
paul@16777
|
94 }
|
paul@16777
|
95 static VALUE rbncurs_addnstr(VALUE dummy, VALUE arg1, VALUE arg2) {
|
paul@16777
|
96 - return INT2NUM(addnstr(STR2CSTR(arg1), NUM2INT(arg2)));
|
paul@16777
|
97 + return INT2NUM(addnstr(StringValuePtr(arg1), NUM2INT(arg2)));
|
paul@16777
|
98 }
|
paul@16777
|
99 static VALUE rbncurs_addstr(VALUE dummy, VALUE arg1) {
|
paul@16777
|
100 - return INT2NUM(addstr(STR2CSTR(arg1)));
|
paul@16777
|
101 + return INT2NUM(addstr(StringValuePtr(arg1)));
|
paul@16777
|
102 }
|
paul@16777
|
103 static VALUE rbncurs_attroff(VALUE dummy, VALUE arg1) {
|
paul@16777
|
104 return INT2NUM(attroff(NUM2ULONG(arg1)));
|
paul@16777
|
105 @@ -1011,10 +1011,10 @@
|
paul@16777
|
106 return INT2NUM(insertln());
|
paul@16777
|
107 }
|
paul@16777
|
108 static VALUE rbncurs_insnstr(VALUE dummy, VALUE arg1, VALUE arg2) {
|
paul@16777
|
109 - return INT2NUM(insnstr(STR2CSTR(arg1), NUM2INT(arg2)));
|
paul@16777
|
110 + return INT2NUM(insnstr(StringValuePtr(arg1), NUM2INT(arg2)));
|
paul@16777
|
111 }
|
paul@16777
|
112 static VALUE rbncurs_insstr(VALUE dummy, VALUE arg1) {
|
paul@16777
|
113 - return INT2NUM(insstr(STR2CSTR(arg1)));
|
paul@16777
|
114 + return INT2NUM(insstr(StringValuePtr(arg1)));
|
paul@16777
|
115 }
|
paul@16777
|
116 #ifdef HAVE_INTRFLUSH
|
paul@16777
|
117 static VALUE rbncurs_intrflush(VALUE dummy, VALUE arg1, VALUE arg2) {
|
paul@16777
|
118 @@ -1070,10 +1070,10 @@
|
paul@16777
|
119 return return_value;
|
paul@16777
|
120 }
|
paul@16777
|
121 static VALUE rbncurs_mvaddnstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4) {
|
paul@16777
|
122 - return INT2NUM(mvaddnstr(NUM2INT(arg1), NUM2INT(arg2), STR2CSTR(arg3), NUM2INT(arg4)));
|
paul@16777
|
123 + return INT2NUM(mvaddnstr(NUM2INT(arg1), NUM2INT(arg2), StringValuePtr(arg3), NUM2INT(arg4)));
|
paul@16777
|
124 }
|
paul@16777
|
125 static VALUE rbncurs_mvaddstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3) {
|
paul@16777
|
126 - return INT2NUM(mvaddstr(NUM2INT(arg1), NUM2INT(arg2), STR2CSTR(arg3)));
|
paul@16777
|
127 + return INT2NUM(mvaddstr(NUM2INT(arg1), NUM2INT(arg2), StringValuePtr(arg3)));
|
paul@16777
|
128 }
|
paul@16777
|
129 #ifdef HAVE_MVCHGAT
|
paul@16777
|
130 static VALUE rbncurs_mvchgat(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4, VALUE arg5, VALUE arg6) {
|
paul@16777
|
131 @@ -1106,10 +1106,10 @@
|
paul@16777
|
132 return INT2NUM(mvinsch(NUM2INT(arg1), NUM2INT(arg2), NUM2ULONG(arg3)));
|
paul@16777
|
133 }
|
paul@16777
|
134 static VALUE rbncurs_mvinsnstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4) {
|
paul@16777
|
135 - return INT2NUM(mvinsnstr(NUM2INT(arg1), NUM2INT(arg2), STR2CSTR(arg3), NUM2INT(arg4)));
|
paul@16777
|
136 + return INT2NUM(mvinsnstr(NUM2INT(arg1), NUM2INT(arg2), StringValuePtr(arg3), NUM2INT(arg4)));
|
paul@16777
|
137 }
|
paul@16777
|
138 static VALUE rbncurs_mvinsstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3) {
|
paul@16777
|
139 - return INT2NUM(mvinsstr(NUM2INT(arg1), NUM2INT(arg2), STR2CSTR(arg3)));
|
paul@16777
|
140 + return INT2NUM(mvinsstr(NUM2INT(arg1), NUM2INT(arg2), StringValuePtr(arg3)));
|
paul@16777
|
141 }
|
paul@16777
|
142 #ifdef HAVE_MVVLINE
|
paul@16777
|
143 static VALUE rbncurs_mvvline(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4) {
|
paul@16777
|
144 @@ -1137,10 +1137,10 @@
|
paul@16777
|
145 return return_value;
|
paul@16777
|
146 }
|
paul@16777
|
147 static VALUE rbncurs_mvwaddnstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4, VALUE arg5) {
|
paul@16777
|
148 - return INT2NUM(mvwaddnstr(get_window(arg1), NUM2INT(arg2), NUM2INT(arg3), STR2CSTR(arg4), NUM2INT(arg5)));
|
paul@16777
|
149 + return INT2NUM(mvwaddnstr(get_window(arg1), NUM2INT(arg2), NUM2INT(arg3), StringValuePtr(arg4), NUM2INT(arg5)));
|
paul@16777
|
150 }
|
paul@16777
|
151 static VALUE rbncurs_mvwaddstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4) {
|
paul@16777
|
152 - return INT2NUM(mvwaddstr(get_window(arg1), NUM2INT(arg2), NUM2INT(arg3), STR2CSTR(arg4)));
|
paul@16777
|
153 + return INT2NUM(mvwaddstr(get_window(arg1), NUM2INT(arg2), NUM2INT(arg3), StringValuePtr(arg4)));
|
paul@16777
|
154 }
|
paul@16777
|
155 #ifdef HAVE_MVWCHGAT
|
paul@16777
|
156 static VALUE rbncurs_mvwchgat(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4, VALUE arg5, VALUE arg6, VALUE arg7) {
|
paul@16777
|
157 @@ -1171,10 +1171,10 @@
|
paul@16777
|
158 return INT2NUM(mvwinsch(get_window(arg1), NUM2INT(arg2), NUM2INT(arg3), NUM2ULONG(arg4)));
|
paul@16777
|
159 }
|
paul@16777
|
160 static VALUE rbncurs_mvwinsnstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4, VALUE arg5) {
|
paul@16777
|
161 - return INT2NUM(mvwinsnstr(get_window(arg1), NUM2INT(arg2), NUM2INT(arg3), STR2CSTR(arg4), NUM2INT(arg5)));
|
paul@16777
|
162 + return INT2NUM(mvwinsnstr(get_window(arg1), NUM2INT(arg2), NUM2INT(arg3), StringValuePtr(arg4), NUM2INT(arg5)));
|
paul@16777
|
163 }
|
paul@16777
|
164 static VALUE rbncurs_mvwinsstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4) {
|
paul@16777
|
165 - return INT2NUM(mvwinsstr(get_window(arg1), NUM2INT(arg2), NUM2INT(arg3), STR2CSTR(arg4)));
|
paul@16777
|
166 + return INT2NUM(mvwinsstr(get_window(arg1), NUM2INT(arg2), NUM2INT(arg3), StringValuePtr(arg4)));
|
paul@16777
|
167 }
|
paul@16777
|
168 #ifdef HAVE_MVWVLINE
|
paul@16777
|
169 static VALUE rbncurs_mvwvline(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, VALUE arg4, VALUE arg5) {
|
paul@16777
|
170 @@ -1238,7 +1238,7 @@
|
paul@16777
|
171 }
|
paul@16777
|
172 #ifdef HAVE_PUTP
|
paul@16777
|
173 static VALUE rbncurs_putp(VALUE dummy, VALUE arg1) {
|
paul@16777
|
174 - return INT2NUM(putp(STR2CSTR(arg1)));
|
paul@16777
|
175 + return INT2NUM(putp(StringValuePtr(arg1)));
|
paul@16777
|
176 }
|
paul@16777
|
177 #endif
|
paul@16777
|
178 #ifdef HAVE_QIFLUSH
|
paul@16777
|
179 @@ -1271,12 +1271,12 @@
|
paul@16777
|
180 }
|
paul@16777
|
181 #ifdef HAVE_SCR_DUMP
|
paul@16777
|
182 static VALUE rbncurs_scr_dump(VALUE dummy, VALUE arg1) {
|
paul@16777
|
183 - return INT2NUM(scr_dump(STR2CSTR(arg1)));
|
paul@16777
|
184 + return INT2NUM(scr_dump(StringValuePtr(arg1)));
|
paul@16777
|
185 }
|
paul@16777
|
186 #endif
|
paul@16777
|
187 #ifdef HAVE_SCR_INIT
|
paul@16777
|
188 static VALUE rbncurs_scr_init(VALUE dummy, VALUE arg1) {
|
paul@16777
|
189 - return INT2NUM(scr_init(STR2CSTR(arg1)));
|
paul@16777
|
190 + return INT2NUM(scr_init(StringValuePtr(arg1)));
|
paul@16777
|
191 }
|
paul@16777
|
192 #endif
|
paul@16777
|
193 static VALUE rbncurs_scrl(VALUE dummy, VALUE arg1) {
|
paul@16777
|
194 @@ -1290,12 +1290,12 @@
|
paul@16777
|
195 }
|
paul@16777
|
196 #ifdef HAVE_SCR_RESTORE
|
paul@16777
|
197 static VALUE rbncurs_scr_restore(VALUE dummy, VALUE arg1) {
|
paul@16777
|
198 - return INT2NUM(scr_restore(STR2CSTR(arg1)));
|
paul@16777
|
199 + return INT2NUM(scr_restore(StringValuePtr(arg1)));
|
paul@16777
|
200 }
|
paul@16777
|
201 #endif
|
paul@16777
|
202 #ifdef HAVE_SCR_SET
|
paul@16777
|
203 static VALUE rbncurs_scr_set(VALUE dummy, VALUE arg1) {
|
paul@16777
|
204 - return INT2NUM(scr_set(STR2CSTR(arg1)));
|
paul@16777
|
205 + return INT2NUM(scr_set(StringValuePtr(arg1)));
|
paul@16777
|
206 }
|
paul@16777
|
207 #endif
|
paul@16777
|
208 static VALUE rbncurs_setscrreg(VALUE dummy, VALUE arg1, VALUE arg2) {
|
paul@16777
|
209 @@ -1352,7 +1352,7 @@
|
paul@16777
|
210 return INT2NUM(slk_restore());
|
paul@16777
|
211 }
|
paul@16777
|
212 static VALUE rbncurs_slk_set(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3) {
|
paul@16777
|
213 - return INT2NUM(slk_set(NUM2INT(arg1), STR2CSTR(arg2), NUM2INT(arg3)));
|
paul@16777
|
214 + return INT2NUM(slk_set(NUM2INT(arg1), StringValuePtr(arg2), NUM2INT(arg3)));
|
paul@16777
|
215 }
|
paul@16777
|
216 static VALUE rbncurs_slk_touch(VALUE dummy) {
|
paul@16777
|
217 return INT2NUM(slk_touch());
|
paul@16777
|
218 @@ -1383,17 +1383,17 @@
|
paul@16777
|
219 }
|
paul@16777
|
220 #ifdef HAVE_TIGETFLAG
|
paul@16777
|
221 static VALUE rbncurs_tigetflag(VALUE dummy, VALUE arg1) {
|
paul@16777
|
222 - return INT2NUM(tigetflag(STR2CSTR(arg1)));
|
paul@16777
|
223 + return INT2NUM(tigetflag(StringValuePtr(arg1)));
|
paul@16777
|
224 }
|
paul@16777
|
225 #endif
|
paul@16777
|
226 #ifdef HAVE_TIGETNUM
|
paul@16777
|
227 static VALUE rbncurs_tigetnum(VALUE dummy, VALUE arg1) {
|
paul@16777
|
228 - return INT2NUM(tigetnum(STR2CSTR(arg1)));
|
paul@16777
|
229 + return INT2NUM(tigetnum(StringValuePtr(arg1)));
|
paul@16777
|
230 }
|
paul@16777
|
231 #endif
|
paul@16777
|
232 #ifdef HAVE_TIGETSTR
|
paul@16777
|
233 static VALUE rbncurs_tigetstr(VALUE dummy, VALUE arg1) {
|
paul@16777
|
234 - return rb_str_new2(tigetstr(STR2CSTR(arg1)));
|
paul@16777
|
235 + return rb_str_new2(tigetstr(StringValuePtr(arg1)));
|
paul@16777
|
236 }
|
paul@16777
|
237 #endif
|
paul@16777
|
238 static VALUE rbncurs_timeout(VALUE dummy, VALUE arg1) {
|
paul@16777
|
239 @@ -1438,10 +1438,10 @@
|
paul@16777
|
240 return return_value;
|
paul@16777
|
241 }
|
paul@16777
|
242 static VALUE rbncurs_waddnstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3) {
|
paul@16777
|
243 - return INT2NUM(waddnstr(get_window(arg1), STR2CSTR(arg2), NUM2INT(arg3)));
|
paul@16777
|
244 + return INT2NUM(waddnstr(get_window(arg1), StringValuePtr(arg2), NUM2INT(arg3)));
|
paul@16777
|
245 }
|
paul@16777
|
246 static VALUE rbncurs_waddstr(VALUE dummy, VALUE arg1, VALUE arg2) {
|
paul@16777
|
247 - return INT2NUM(waddstr(get_window(arg1), STR2CSTR(arg2)));
|
paul@16777
|
248 + return INT2NUM(waddstr(get_window(arg1), StringValuePtr(arg2)));
|
paul@16777
|
249 }
|
paul@16777
|
250 static VALUE rbncurs_wattron(VALUE dummy, VALUE arg1, VALUE arg2) {
|
paul@16777
|
251 return INT2NUM(wattron(get_window(arg1), NUM2INT(arg2)));
|
paul@16777
|
252 @@ -1514,10 +1514,10 @@
|
paul@16777
|
253 return INT2NUM(winsertln(get_window(arg1)));
|
paul@16777
|
254 }
|
paul@16777
|
255 static VALUE rbncurs_winsnstr(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3) {
|
paul@16777
|
256 - return INT2NUM(winsnstr(get_window(arg1), STR2CSTR(arg2), NUM2INT(arg3)));
|
paul@16777
|
257 + return INT2NUM(winsnstr(get_window(arg1), StringValuePtr(arg2), NUM2INT(arg3)));
|
paul@16777
|
258 }
|
paul@16777
|
259 static VALUE rbncurs_winsstr(VALUE dummy, VALUE arg1, VALUE arg2) {
|
paul@16777
|
260 - return INT2NUM(winsstr(get_window(arg1), STR2CSTR(arg2)));
|
paul@16777
|
261 + return INT2NUM(winsstr(get_window(arg1), StringValuePtr(arg2)));
|
paul@16777
|
262 }
|
paul@16777
|
263 static VALUE rbncurs_wmove(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3) {
|
paul@16777
|
264 return INT2NUM(wmove(get_window(arg1), NUM2INT(arg2), NUM2INT(arg3)));
|
paul@16777
|
265 @@ -1619,7 +1619,7 @@
|
paul@16777
|
266 { return rb_str_new2(unctrl(NUM2ULONG(ch))); }
|
paul@16777
|
267 static VALUE rbncurs_newterm(VALUE dummy, VALUE rb_type, VALUE rb_outfd, VALUE rb_infd)
|
paul@16777
|
268 {
|
paul@16777
|
269 - char * type = (rb_type == Qnil) ? (char*)0 : STR2CSTR(rb_type);
|
paul@16777
|
270 + char * type = (rb_type == Qnil) ? (char*)0 : StringValuePtr(rb_type);
|
paul@16777
|
271 int outfd = NUM2INT(rb_funcall(rb_outfd, rb_intern("to_i"), 0));
|
paul@16777
|
272 int infd = NUM2INT(rb_funcall(rb_infd, rb_intern("to_i"), 0));
|
paul@16777
|
273 VALUE rb_screen =
|
paul@16777
|
274 @@ -2277,7 +2277,7 @@
|
paul@16777
|
275 #ifdef HAVE_MCPRINT
|
paul@16777
|
276 static VALUE rbncurs_mcprint(VALUE dummy, VALUE data, VALUE len)
|
paul@16777
|
277 {
|
paul@16777
|
278 - return INT2NUM(mcprint(STR2CSTR(data), NUM2INT(len)));
|
paul@16777
|
279 + return INT2NUM(mcprint(StringValuePtr(data), NUM2INT(len)));
|
paul@16777
|
280 }
|
paul@16777
|
281 #endif
|
paul@16777
|
282 #ifdef HAVE_HAS_KEY
|
paul@16777
|
283 @@ -2378,9 +2378,9 @@
|
paul@16777
|
284 " and a String");
|
paul@16777
|
285 return Qnil;
|
paul@16777
|
286 }
|
paul@16777
|
287 + VALUE tmp = rb_funcall3(rb_mKernel, rb_intern("sprintf"), argc-1, argv + 1);
|
paul@16777
|
288 wprintw(get_window(argv[0]), "%s",
|
paul@16777
|
289 - STR2CSTR(rb_funcall3(rb_mKernel, rb_intern("sprintf"), argc-1,
|
paul@16777
|
290 - argv + 1)));
|
paul@16777
|
291 + StringValuePtr(tmp));
|
paul@16777
|
292 return Qnil;
|
paul@16777
|
293 }
|
paul@16777
|
294
|
paul@16777
|
295 @@ -2394,14 +2394,14 @@
|
paul@16777
|
296 return Qnil;
|
paul@16777
|
297 }
|
paul@16777
|
298 _tracef("%s",
|
paul@16777
|
299 - STR2CSTR(rb_funcall3(rb_mKernel, rb_intern("sprintf"), argc, argv)));
|
paul@16777
|
300 + StringValuePtr(funcall3(rb_mKernel, rb_intern("sprintf"), argc, argv)));
|
paul@16777
|
301 return Qnil;
|
paul@16777
|
302 }
|
paul@16777
|
303 #endif /* HAVE__TRACEF */
|
paul@16777
|
304 #ifdef HAVE__TRACEDUMP
|
paul@16777
|
305 static VALUE rbncurs_tracedump(VALUE dummy, VALUE rb_label, VALUE rb_win)
|
paul@16777
|
306 {
|
paul@16777
|
307 - _tracedump(STR2CSTR(rb_label), get_window(rb_win));
|
paul@16777
|
308 + _tracedump(StringValuePtr(rb_label), get_window(rb_win));
|
paul@16777
|
309 }
|
paul@16777
|
310 #endif /* HAVE__TRACEDUMP */
|
paul@16777
|
311 #ifdef HAVE__TRACEATTR
|
paul@16777
|
312 @@ -2706,7 +2706,7 @@
|
paul@16777
|
313
|
paul@16777
|
314 #ifdef HAVE_LOCALE_H
|
paul@16777
|
315 static VALUE rbncurs_setlocale(VALUE dummy, VALUE category, VALUE locale)
|
paul@16777
|
316 -{ return rb_str_new2(setlocale(NUM2INT(category), STR2CSTR(locale)));}
|
paul@16777
|
317 +{ return rb_str_new2(setlocale(NUM2INT(category), StringValuePtr(locale)));}
|
paul@16777
|
318 #endif
|
paul@16777
|
319
|
paul@16777
|
320 static void init_safe_functions(void)
|