From: KUBO T. <ku...@ji...> - 2002-08-21 01:14:03
|
Hi, KUBO Takehiro <ku...@ji...> writes: > Masao Mutoh <mu...@hi...> writes: > >>> (2) integer too big >>> >>> ./drawing.rb:34:in `window': integer 1073891760 too big to convert to `int' (RangeError) (snip) > For example: > ====================================== > --- gtk/src/rbgdkpixmap.c.orig Tue Aug 20 08:11:00 2002 > +++ gtk/src/rbgdkpixmap.c Wed Aug 21 01:16:08 2002 > @@ -25,7 +25,7 @@ > GdkPixmap *new; > GdkWindow *window = get_gdkwindow(win); > > - new = gdk_pixmap_new(window, NUM2INT(w), NUM2INT(h), NUM2INT(depth)); > + new = gdk_pixmap_new(window, NUM2LONG(w), NUM2LONG(h), NUM2LONG(depth)); > return new_gdkpixmap(new); > } > > ====================================== Hmm, my brain had stopped. The 34th line of brawing.rb is 'b = Gdk::Pixmap::new(w.window, g[2], g[3], -1)'. I made patch for Gdk::Pixmap::new. But error occurs at 'w.window'. I saw rbgdk.c. ... tricky :-< It doesn't work on the platform 'sizeof(int) != sizeof(long)' obviously. I made patch for rbgdk.c: http://www.jiubao.org/tmp/0821.dif But I don't touch other files. This patch will not fix all of the 2nd problem. |