Skip to content

Commit db20d02

Browse files
author
Richard Frith-Macdonald
committed
Use alignment information properly
1 parent 956eb5b commit db20d02

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

Source/ObjectiveC2/weak.m

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,8 @@
3434
* pointer (to the class of the object) then the object must be a
3535
* special one of some sort and we assume it's persistent.
3636
*/
37-
#if ALIGNOF_OBJC_OBJECT == 8
38-
if ((intptr_t)obj & 7)
39-
{
40-
return YES;
41-
}
42-
#endif
43-
#if ALIGNOF_OBJC_OBJECT == 4
44-
if ((intptr_t)obj & 3)
37+
#if ALIGNOF_OBJC_OBJECT > 1
38+
if ((intptr_t)obj & (ALIGNOF_OBJC_OBJECT - 1))
4539
{
4640
return YES;
4741
}

0 commit comments

Comments
 (0)