diff --git a/arc.m b/arc.m index 1a81164..86d0982 100644 --- a/arc.m +++ b/arc.m @@ -488,7 +488,6 @@ const static WeakRef NullWeakRef; #define MAP_TABLE_COMPARE_FUNCTION weak_ref_compare #define MAP_TABLE_HASH_KEY ptr_hash #define MAP_TABLE_HASH_VALUE weak_ref_hash -#define MAP_TABLE_HASH_VALUE weak_ref_hash #define MAP_TABLE_VALUE_TYPE struct objc_weak_ref #define MAP_TABLE_VALUE_NULL weak_ref_is_null #define MAP_TABLE_VALUE_PLACEHOLDER NullWeakRef diff --git a/protocol.c b/protocol.c index 63e5c92..5b9e42e 100644 --- a/protocol.c +++ b/protocol.c @@ -361,7 +361,7 @@ objc_property_t *protocol_copyPropertyList(Protocol *protocol, } if (NULL != p->optional_properties) { - count = p->optional_properties->count; + count += p->optional_properties->count; } if (0 == count) { @@ -373,7 +373,7 @@ objc_property_t *protocol_copyPropertyList(Protocol *protocol, { for (int i=0 ; icount ; i++) { - list[out] = &properties->properties[i]; + list[out++] = &properties->properties[i]; } } properties = p->optional_properties; @@ -381,7 +381,7 @@ objc_property_t *protocol_copyPropertyList(Protocol *protocol, { for (int i=0 ; icount ; i++) { - list[out] = &properties->properties[i]; + list[out++] = &properties->properties[i]; } } *outCount = count;