[#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:19320] Re: [patch] cast for st_*.

From: "Akinori MUSHA" <knu@...>
Date: 2003-01-09 03:06:55 UTC
List: ruby-dev #19320
At Thu, 9 Jan 2003 11:46:29 +0900,
I wrote:
> At Thu, 9 Jan 2003 11:17:38 +0900,
> usa wrote:
> > 先日のst.[ch]の変更に伴ってキャストがいっぱい必要になったよう
> > なので、パッチを添付します。
> > 例によってVC++6の警告に従っただけの機械的作業の結果です。
> 
>  あらら。このキャストが必要とすると、 st_*_func_t の変更は戻さ
> ないとまずいですね。拡張ライブラリにも影響しますし。

 これで収まりますか?

Index: st.c
===================================================================
RCS file: /src/ruby/st.c,v
retrieving revision 1.26
diff -u -r1.26 st.c
--- st.c	6 Jan 2003 16:37:29 -0000	1.26
+++ st.c	9 Jan 2003 03:02:54 -0000
@@ -43,8 +43,8 @@
 /* extern int strcmp(const char *, const char *); */
 static int strhash(const char *);
 static struct st_hash_type type_strhash = {
-    (st_compare_func_t)strcmp,
-    (st_hash_func_t)strhash,
+    strcmp,
+    strhash,
 };
 
 #ifdef RUBY_PLATFORM
@@ -482,7 +482,7 @@
 void
 st_foreach(table, func, arg)
     st_table *table;
-    st_each_func_t func;
+    int (*func)();
     st_data_t arg;
 {
     st_table_entry *ptr, *last, *tmp;
Index: st.h
===================================================================
RCS file: /src/ruby/st.h,v
retrieving revision 1.5
diff -u -r1.5 st.h
--- st.h	6 Jan 2003 16:37:29 -0000	1.5
+++ st.h	9 Jan 2003 03:02:54 -0000
@@ -8,15 +8,11 @@
 
 typedef long st_data_t;
 
-typedef int (*st_compare_func_t)(st_data_t data1, st_data_t data2);
-typedef int (*st_hash_func_t)(st_data_t data);
-typedef int (*st_each_func_t)(st_data_t key, st_data_t value, st_data_t data);
-
 typedef struct st_table st_table;
 
 struct st_hash_type {
-    st_compare_func_t compare;
-    st_hash_func_t hash;
+    int (*compare)();
+    int (*hash)();
 };
 
 struct st_table {
@@ -40,14 +36,14 @@
 int st_delete_safe(st_table *, st_data_t *, st_data_t *, st_data_t);
 int st_insert(st_table *, st_data_t, st_data_t);
 int st_lookup(st_table *, st_data_t, st_data_t *);
-void st_foreach(st_table *, st_each_func_t, st_data_t);
+void st_foreach(st_table *, int (*)(), st_data_t);
 void st_add_direct(st_table *, st_data_t, st_data_t);
 void st_free_table(st_table *);
 void st_cleanup_safe(st_table *, st_data_t);
 st_table *st_copy(st_table *);
 
-#define ST_NUMCMP	((st_compare_func_t) 0)
-#define ST_NUMHASH	((st_hash_func_t) -2)
+#define ST_NUMCMP	((int (*)()) 0)
+#define ST_NUMHASH	((int (*)()) -2)
 
 #define st_numcmp	ST_NUMCMP
 #define st_numhash	ST_NUMHASH


-- 
                     /
                    /__  __            Akinori.org / MUSHA.org
                   / )  )  ) )  /     FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ /  ( (__(  @ iDaemons.org / and.or.jp

"It went right by me -- At the time it went over my head
   I was looking out the window.. I should have looked at your face instead"

In This Thread