summaryrefslogtreecommitdiff
path: root/enumerator.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-09 00:38:32 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-09 00:38:32 +0000
commit2f5b8f05299731e1187475ff4bd6b1618bac3a1a (patch)
tree5f22302de3f437b1ba7e2e1d387d9665efda08fd /enumerator.c
parent6a15a37f0b8f03c98f4b47ec777efa1ae75d7526 (diff)
* *.c (*_memsize): do not check ptr.
NULL checking is finished Before call of memsize functions. See r52979. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enumerator.c')
-rw-r--r--enumerator.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/enumerator.c b/enumerator.c
index 1414961..f83a2ca 100644
--- a/enumerator.c
+++ b/enumerator.c
@@ -156,7 +156,7 @@ enumerator_mark(void *p)
static size_t
enumerator_memsize(const void *p)
{
- return p ? sizeof(struct enumerator) : 0;
+ return sizeof(struct enumerator);
}
static const rb_data_type_t enumerator_data_type = {
@@ -1067,7 +1067,7 @@ yielder_mark(void *p)
static size_t
yielder_memsize(const void *p)
{
- return p ? sizeof(struct yielder) : 0;
+ return sizeof(struct yielder);
}
static const rb_data_type_t yielder_data_type = {
@@ -1174,7 +1174,7 @@ generator_mark(void *p)
static size_t
generator_memsize(const void *p)
{
- return p ? sizeof(struct generator) : 0;
+ return sizeof(struct generator);
}
static const rb_data_type_t generator_data_type = {