summaryrefslogtreecommitdiff
path: root/struct.c
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-10-29 21:35:28 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-10-29 21:35:28 +0000
commita2868ff65166b27acbbda4af1b9df84ed3171541 (patch)
tree08a0b09a8416ab4b1da83d70cd2fb85a72edb188 /struct.c
parent454abc5185a4a6425f1140d5c0e2157f8d3f75e1 (diff)
* eval.c, file.c, gc.c, io.c, object.c, ruby.c, ruby.h, struct.c,
ext/socket/socket.c: differentiate long and int; use proper printf type specifiers and do casts where appropriate. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/struct.c b/struct.c
index 324ecc52a1..57e9e11c2d 100644
--- a/struct.c
+++ b/struct.c
@@ -472,10 +472,10 @@ rb_struct_aref(s, idx)
i = NUM2LONG(idx);
if (i < 0) i = RSTRUCT(s)->len + i;
if (i < 0)
- rb_raise(rb_eIndexError, "offset %d too small for struct(size:%d)",
+ rb_raise(rb_eIndexError, "offset %ld too small for struct(size:%ld)",
i, RSTRUCT(s)->len);
if (RSTRUCT(s)->len <= i)
- rb_raise(rb_eIndexError, "offset %d too large for struct(size:%d)",
+ rb_raise(rb_eIndexError, "offset %ld too large for struct(size:%ld)",
i, RSTRUCT(s)->len);
return RSTRUCT(s)->ptr[i];
}
@@ -517,11 +517,11 @@ rb_struct_aset(s, idx, val)
i = NUM2LONG(idx);
if (i < 0) i = RSTRUCT(s)->len + i;
if (i < 0) {
- rb_raise(rb_eIndexError, "offset %d too small for struct(size:%d)",
+ rb_raise(rb_eIndexError, "offset %ld too small for struct(size:%ld)",
i, RSTRUCT(s)->len);
}
if (RSTRUCT(s)->len <= i) {
- rb_raise(rb_eIndexError, "offset %d too large for struct(size:%d)",
+ rb_raise(rb_eIndexError, "offset %ld too large for struct(size:%ld)",
i, RSTRUCT(s)->len);
}
rb_struct_modify(s);