Fix some bugs in protocol property introspection and remove a redundant #define.

Reported by Krystof Vasa!
main
theraven 13 years ago
parent 68a4607f16
commit 8979f19f1d

@ -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

@ -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 ; i<properties->count ; 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 ; i<properties->count ; i++)
{
list[out] = &properties->properties[i];
list[out++] = &properties->properties[i];
}
}
*outCount = count;

Loading…
Cancel
Save