summaryrefslogtreecommitdiff
path: root/ext/-test-
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-03 05:36:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-03 05:36:18 +0000
commit2320264ef6ad12b824940e4aa223b662e5a308fa (patch)
treee4cae800f66eef1c343526e528c4824ff6a39200 /ext/-test-
parentaf97388bc40d5f0ce2e9e3c452e9849f0f1166b1 (diff)
foreach.c: printf specifier
* ext/-test-/st/foreach/foreach.c: get rid of hard coded "%lu", since st_data_t depends on the platforms. use PRIuVALUE with casting VALUE instead since there is no specifier for it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/-test-')
-rw-r--r--ext/-test-/st/foreach/foreach.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/ext/-test-/st/foreach/foreach.c b/ext/-test-/st/foreach/foreach.c
index d9be603..1e0fd51 100644
--- a/ext/-test-/st/foreach/foreach.c
+++ b/ext/-test-/st/foreach/foreach.c
@@ -24,10 +24,10 @@ force_unpack_check(struct checker *c, st_data_t key, st_data_t val)
}
if (key != c->nr) {
- rb_bug("unexpected key: %lu (expected %lu)\n", key, c->nr);
+ rb_bug("unexpected key: %"PRIuVALUE" (expected %"PRIuVALUE")\n", (VALUE)key, (VALUE)c->nr);
}
if (val != c->nr) {
- rb_bug("unexpected val: %lu (expected %lu)\n", val, c->nr);
+ rb_bug("unexpected val: %"PRIuVALUE" (expected %"PRIuVALUE")\n", (VALUE)val, (VALUE)c->nr);
}
c->nr++;
@@ -63,7 +63,7 @@ unp_fec_i(st_data_t key, st_data_t val, st_data_t args, int error)
rb_bug("failed to delete\n");
}
if (v != 0) {
- rb_bug("unexpected value deleted: %lu (expected 0)", v);
+ rb_bug("unexpected value deleted: %"PRIuVALUE" (expected 0)", (VALUE)v);
}
}
return ST_CHECK;
@@ -90,12 +90,12 @@ unp_fec(VALUE self, VALUE test)
if (c.test == ID2SYM(rb_intern("delete2"))) {
if (c.nr != 1) {
- rb_bug("mismatched iteration: %lu (expected 1)\n", c.nr);
+ rb_bug("mismatched iteration: %"PRIuVALUE" (expected 1)\n", (VALUE)c.nr);
}
}
else if (c.nr != expect_size) {
- rb_bug("mismatched iteration: %lu (expected %lu)\n",
- c.nr, expect_size);
+ rb_bug("mismatched iteration: %"PRIuVALUE" (expected %"PRIuVALUE")\n",
+ (VALUE)c.nr, (VALUE)expect_size);
}
if (tbl->entries_packed) rb_bug("should be unpacked\n");
@@ -123,7 +123,7 @@ unp_fe_i(st_data_t key, st_data_t val, st_data_t args, int error)
rb_bug("failed to delete\n");
}
if (v != 0) {
- rb_bug("unexpected value deleted: %lu (expected 0)", v);
+ rb_bug("unexpected value deleted: %"PRIuVALUE" (expected 0)", (VALUE)v);
}
return ST_CONTINUE;
}
@@ -151,12 +151,12 @@ unp_fe(VALUE self, VALUE test)
if (c.test == ID2SYM(rb_intern("unpack_delete"))) {
if (c.nr != 1) {
- rb_bug("mismatched iteration: %lu (expected 1)\n", c.nr);
+ rb_bug("mismatched iteration: %"PRIuVALUE" (expected 1)\n", (VALUE)c.nr);
}
}
else if (c.nr != expect_size) {
- rb_bug("mismatched iteration: %lu (expected %lu)\n",
- c.nr, expect_size);
+ rb_bug("mismatched iteration: %"PRIuVALUE" (expected %"PRIuVALUE"o)\n",
+ (VALUE)c.nr, (VALUE)expect_size);
}
if (tbl->entries_packed) rb_bug("should be unpacked\n");