From 7f007e354e03077295b5dc1ab864da79de7f039f Mon Sep 17 00:00:00 2001 From: rfm Date: Fri, 4 Jul 2014 11:07:30 +0000 Subject: [PATCH] fix bug in small object test on 64bit systems --- runtime.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/runtime.c b/runtime.c index 9b96ea3..4352ccc 100644 --- a/runtime.c +++ b/runtime.c @@ -771,8 +771,7 @@ Class object_setClass(id obj, Class cls) { CHECK_ARG(obj); // If this is a small object, then don't set its class. - uintptr_t addr = (uintptr_t)obj; - if (addr & 1) { return classForObject(obj); } + if (isSmallObject(obj)) { return classForObject(obj); } Class oldClass = obj->isa; obj->isa = cls; return oldClass;