summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-25 05:36:55 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-25 05:36:55 +0000
commit85911c410a6b367ba3555f5e86c8e33db37344af (patch)
tree1a97c77f3d15e4d031b24462bc4e04ded804645b /array.c
parent43601a1d171333cccea5d656e0f18b77cb1ff987 (diff)
* ext/socket/socket.c (tcp_s_gethostbyname): was using
uninitialized size_t value. [ruby-talk:76946] * Minor cleanups. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r--array.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/array.c b/array.c
index b05ae33..9404e6a 100644
--- a/array.c
+++ b/array.c
@@ -1817,7 +1817,7 @@ rb_ary_and(ary1, ary2)
for (i=0; i<RARRAY(ary1)->len; i++) {
VALUE v = RARRAY(ary1)->ptr[i];
- if (st_delete(RHASH(hash)->tbl, &v, 0)) {
+ if (st_delete(RHASH(hash)->tbl, (st_data_t*)&v, 0)) {
rb_ary_push(ary3, RARRAY(ary1)->ptr[i]);
}
}
@@ -1839,13 +1839,13 @@ rb_ary_or(ary1, ary2)
for (i=0; i<RARRAY(ary1)->len; i++) {
v = RARRAY(ary1)->ptr[i];
- if (st_delete(RHASH(hash)->tbl, &v, 0)) {
+ if (st_delete(RHASH(hash)->tbl, (st_data_t*)&v, 0)) {
rb_ary_push(ary3, RARRAY(ary1)->ptr[i]);
}
}
for (i=0; i<RARRAY(ary2)->len; i++) {
v = RARRAY(ary2)->ptr[i];
- if (st_delete(RHASH(hash)->tbl, &v, 0)) {
+ if (st_delete(RHASH(hash)->tbl, (st_data_t*)&v, 0)) {
rb_ary_push(ary3, RARRAY(ary2)->ptr[i]);
}
}
@@ -1870,7 +1870,7 @@ rb_ary_uniq_bang(ary)
end = p + RARRAY(ary)->len;
while (p < end) {
VALUE v = *p;
- if (st_delete(RHASH(hash)->tbl, &v, 0)) {
+ if (st_delete(RHASH(hash)->tbl, (st_data_t*)&v, 0)) {
*q++ = *p;
}
p++;