unsigned int highest_bit;
};
+#define CAP_ORPHANED 0x1
+
struct CapabilityEntry {
- unsigned int orphaned;
unsigned int value;
+ unsigned int flags;
};
unsigned int
s_assert(index != NULL);
entry = irc_dictionary_retrieve(index->cap_dict, cap);
- if (entry != NULL && !entry->orphaned)
+ if (entry != NULL && !(entry->flags & CAP_ORPHANED))
return entry->value;
return 0xFFFFFFFF;
if ((entry = irc_dictionary_retrieve(index->cap_dict, cap)) != NULL)
{
- entry->orphaned = 0;
+ entry->flags &= ~CAP_ORPHANED;
return entry->value;
}
entry = rb_malloc(sizeof(struct CapabilityEntry));
- entry->orphaned = 0;
+ entry->flags = 0;
entry->value = index->highest_bit;
irc_dictionary_add(index->cap_dict, cap, entry);
entry = irc_dictionary_retrieve(index->cap_dict, cap);
if (entry != NULL)
- entry->orphaned = 1;
+ entry->flags |= CAP_ORPHANED;
}
static void