[#19261] lstripped here-document (Re: comments and continuing strings on the next line) — nobu.nakada@...

なかだです。

29 messages 2003/01/01
[#19360] Re: lstripped here-document (Re: comments and continuing strings on the next line) — "K.Kosako" <kosako@...> 2003/01/15

nobu.nakada@nifty.ne.jpさんの

[#19361] Re: lstripped here-document (Re: comments and continuing strings on the next line) — "NAKAMURA, Hiroshi" <nakahiro@...> 2003/01/15

なひです。

[#19364] Re: lstripped here-document (Re: comments and continuing strings on the next line) — nobu.nakada@... 2003/01/17

なかだです。

[#19366] Re: lstripped here-document (Re: comments and continuing strings on the next line) — "NAKAMURA, Hiroshi" <nakahiro@...> 2003/01/17

なひです。

[#19299] [BUG] errno == 0 — Kazuhiro Yoshida <moriq@...>

もりきゅうです。win32だけかもしれません。

22 messages 2003/01/04
[#19301] Re: [BUG] errno == 0 — "U.Nakamura" <usa@...> 2003/01/04

こんにちは、なかむら(う)です。

[#19302] Re: [BUG] errno == 0 — "U.Nakamura" <usa@...> 2003/01/04

こんにちは、なかむら(う)です。

[#19303] Re: [BUG] errno == 0 — "U.Nakamura" <usa@...> 2003/01/04

こんにちは、なかむら(う)です。

[#19304] Re: [BUG] errno == 0 — "U.Nakamura" <usa@...> 2003/01/04

こんにちは、なかむら(う)です。

[#19306] Re: [BUG] errno == 0 — nobu.nakada@... 2003/01/05

なかだです。

[ruby-dev:19329] [Ruby/DL] Bignum to ...

From: WATANABE Hirofumi <eban@...>
Date: 2003-01-09 07:30:59 UTC
List: ruby-dev #19329
わたなべです。

Win32API.rbを作っていてはまったんですが、たとえば
  % cat foo.c
  int foo(int i)
  {
      return i;
  }
  % cat foo.rb
  require 'dl'
  
  handle = DL::Handle.new("./foo.so")
  foo = handle.sym("foo", "II")
  p foo.call(0x80000000)
  % gcc -shared foo.c -o foo.so
とした場合、実際に実行すると
  % ruby foo.rb
  foo.rb:5:in `call': bignum too big to convert into `int' (RangeError)
          from foo.rb:5
となります。これはNUM2INTやNUM2LONGを使っているためで、
0x80000000から0xFFFFFFFFまでが渡せません。
ここはNUM2UINTやNUM2ULONGを使う必要があると思います。

さらにrb_dlsym_initialize()ではポインタへの変換にも使われてますが、
  saddr = (void*)(DLNUM2LONG(rb_Integer(addr)));
こっちでも起こる可能性があります。

-- 
わたなべひろふみ

In This Thread

Prev Next