[#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:19335] Re: [Ruby/DL] 'S', 's'

From: WATANABE Hirofumi <eban@...>
Date: 2003-01-09 09:34:38 UTC
List: ruby-dev #19335
わたなべです。

Takaaki Tateishi <ttate@kt.jaist.ac.jp> writes:

> At Thu, 9 Jan 2003 16:13:17 +0900,
> > となってますが、ext/dl/sym.cのrb_dlsym_call()を見ると逆です。
> >   case 'S':
> >     return "const char *";
> >   case 's':
> >     return "char *";
> > という記述もあるので、どうも実装のほうが間違ってるようです。
> 
> 一瞬自分でも間違えてるかもと思ってしまいましたが,実は const char * と
> いう記述が正確ではないです.const char * とあるのはあくまで書き込みを
> 行わないという宣言程度の意味です.

こっちでは'S'は書き込みは行なわないという宣言で、

> 以下の結果となりますが,すべて意図した通りのものです. 'S' の方はRuby
> で確保されている実際の文字列の領域へ書き込みが行われそのままそのオブジ
> ェクトを返します.'s'の方はdl内部でメモリを確保して新しいStringオブジェ
> クトを返しています.

こっちでは'S'は書き込みが行なわれる?ってよくわかりません。
やっぱり逆じゃないでしょうか?
#わたしがCのほうの関数を中心に考えているから?

実を言うと
  http://kt-www.jaist.ac.jp/~ttate/ruby/ruby-dl-doc-ja/rbdl.pdf
を最初に読んだので、素直に実装のほうが間違っていると思いました。
    S : an immutable string (const char *)
    s : a mutable string (char *)
という記述も's'のほうが書き換わるという意味に取りました。

-- 
わたなべひろふみ

In This Thread