diff options
Diffstat (limited to 'ext/curses/curses.c')
-rw-r--r-- | ext/curses/curses.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ext/curses/curses.c b/ext/curses/curses.c index 89396a805f..49fa07bd5c 100644 --- a/ext/curses/curses.c +++ b/ext/curses/curses.c @@ -412,11 +412,13 @@ window_s_new(class, lines, cols, top, left) { VALUE w; WINDOW *window; + VALUE args[4]; window = newwin(NUM2INT(lines), NUM2INT(cols), NUM2INT(top), NUM2INT(left)); wclear(window); w = prep_window(class, window); - rb_obj_call_init(w); + args[0] = lines; args[1] = cols; args[2] = top; args[3] = left; + rb_obj_call_init(w, 4, args); return w; } @@ -432,11 +434,17 @@ window_subwin(obj, lines, cols, top, left) { struct windata *winp; WINDOW *window; + VALUE w; + VALUE args[4]; GetWINDOW(obj, winp); window = subwin(winp->window, NUM2INT(lines), NUM2INT(cols), NUM2INT(top), NUM2INT(left)); - return prep_window(cWindow, window); + w = prep_window(cWindow, window); + args[0] = lines; args[1] = cols; args[2] = top; args[3] = left; + rb_obj_call_init(w, 4, args); + + return w; } /* def close */ |