summaryrefslogtreecommitdiff
path: root/ext/gdbm
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-21 21:23:42 (GMT)
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-21 21:23:42 (GMT)
commit78df33a0c14bc330f983f4a27c334c2cfbec9c2e (patch)
tree3d8c5afb19e6def1f1ea5e52b4a668ad53cd8c37 /ext/gdbm
parent80b64d145a30613a7d357f9f942e5846c064ea0e (diff)
* enc/utf_16le.c: surpress warning: shorten-64-to-32.
* ext/dbm/dbm.c: ditto. * ext/gdbm/gdbm.c: ditto. * parse.y (Init_ripper): surpress warning: unused value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/gdbm')
-rw-r--r--ext/gdbm/gdbm.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/ext/gdbm/gdbm.c b/ext/gdbm/gdbm.c
index f2b9357..6f0c14d 100644
--- a/ext/gdbm/gdbm.c
+++ b/ext/gdbm/gdbm.c
@@ -300,7 +300,7 @@ rb_gdbm_fetch2(GDBM_FILE dbm, VALUE keystr)
StringValue(keystr);
key.dptr = RSTRING_PTR(keystr);
- key.dsize = RSTRING_LEN(keystr);
+ key.dsize = (int)RSTRING_LEN(keystr);
return rb_gdbm_fetch(dbm, key);
}
@@ -338,7 +338,7 @@ rb_gdbm_nextkey(GDBM_FILE dbm, VALUE keystr)
VALUE str;
key.dptr = RSTRING_PTR(keystr);
- key.dsize = RSTRING_LEN(keystr);
+ key.dsize = (int)RSTRING_LEN(keystr);
key2 = gdbm_nextkey(dbm, key);
if (key2.dptr == 0)
return Qnil;
@@ -416,9 +416,9 @@ fgdbm_key(VALUE obj, VALUE valstr)
valstr2 = rb_gdbm_fetch2(dbm, keystr);
if (!NIL_P(valstr2) &&
- RSTRING_LEN(valstr) == RSTRING_LEN(valstr2) &&
+ (int)RSTRING_LEN(valstr) == (int)RSTRING_LEN(valstr2) &&
memcmp(RSTRING_PTR(valstr), RSTRING_PTR(valstr2),
- RSTRING_LEN(valstr)) == 0) {
+ (int)RSTRING_LEN(valstr)) == 0) {
return keystr;
}
}
@@ -499,7 +499,7 @@ rb_gdbm_delete(VALUE obj, VALUE keystr)
rb_gdbm_modify(obj);
StringValue(keystr);
key.dptr = RSTRING_PTR(keystr);
- key.dsize = RSTRING_LEN(keystr);
+ key.dsize = (int)RSTRING_LEN(keystr);
GetDBM2(obj, dbmp, dbm);
if (!gdbm_exists(dbm, key)) {
@@ -591,7 +591,7 @@ fgdbm_delete_if(VALUE obj)
for (i = 0; i < RARRAY_LEN(ary); i++)
rb_gdbm_delete(obj, RARRAY_PTR(ary)[i]);
if (status) rb_jump_tag(status);
- if (n > 0) dbmp->di_size = n - RARRAY_LEN(ary);
+ if (n > 0) dbmp->di_size = n - (int)RARRAY_LEN(ary);
return obj;
}
@@ -683,10 +683,10 @@ fgdbm_store(VALUE obj, VALUE keystr, VALUE valstr)
StringValue(valstr);
key.dptr = RSTRING_PTR(keystr);
- key.dsize = RSTRING_LEN(keystr);
+ key.dsize = (int)RSTRING_LEN(keystr);
val.dptr = RSTRING_PTR(valstr);
- val.dsize = RSTRING_LEN(valstr);
+ val.dsize = (int)RSTRING_LEN(valstr);
GetDBM2(obj, dbmp, dbm);
dbmp->di_size = -1;
@@ -942,7 +942,7 @@ fgdbm_has_key(VALUE obj, VALUE keystr)
StringValue(keystr);
key.dptr = RSTRING_PTR(keystr);
- key.dsize = RSTRING_LEN(keystr);
+ key.dsize = (int)RSTRING_LEN(keystr);
GetDBM2(obj, dbmp, dbm);
if (gdbm_exists(dbm, key))
@@ -973,9 +973,9 @@ fgdbm_has_value(VALUE obj, VALUE valstr)
valstr2 = rb_gdbm_fetch2(dbm, keystr);
if (!NIL_P(valstr2) &&
- RSTRING_LEN(valstr) == RSTRING_LEN(valstr2) &&
+ (int)RSTRING_LEN(valstr) == (int)RSTRING_LEN(valstr2) &&
memcmp(RSTRING_PTR(valstr), RSTRING_PTR(valstr2),
- RSTRING_LEN(valstr)) == 0) {
+ (int)RSTRING_LEN(valstr)) == 0) {
return Qtrue;
}
}