[Kakasi-dev 83] Re: KAKASI-2.3.5.pre1 のパッチ

Tadamasa Teranishi yw3t-trns @ asahi-net.or.jp
2007年 10月 31日 (水) 16:28:03 JST


寺西です。

NOKUBI Takatsugu wrote:
> 
>   iconv_tの実体はvoid *で、C言語においてポインタできちんと定義されてい
> るのはNULLだけなので、-1を使うのは止めました。

(iconv_t)(-1) を使うことに何ら問題はありません。
iconv.h には以下のように書かれています。

The iconv_t type is a pointer type in all cases I have seen. (It
has to be a scalar type because (iconv_t)(-1) is a possible return value
from iconv_open().)

また man iconv_open にも以下のように書かれています。

RETURN VALUE
       The iconv_open function returns a freshly allocated conversion
descrip-
       tor. In case of error, it sets errno and returns (iconv_t)(-1).
-- 
=====================================================================
寺西 忠勝(TADAMASA TERANISHI)  yw3t-trns @ asahi-net.or.jp
http://www.asahi-net.or.jp/~yw3t-trns/index.htm
Key fingerprint =  474E 4D93 8E97 11F6 662D  8A42 17F5 52F4 10E7 D14E




Kakasi-dev メーリングリストの案内