DICTIONARY_FOREACH → RB_DICTIONARY_FOREACH
This is in librb and therefore should be prefixed.
This commit is contained in:
parent
28b856b7ce
commit
56f84dedf7
5 changed files with 11 additions and 11 deletions
|
@ -243,12 +243,12 @@ load_help(void)
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DICTIONARY_FOREACH(cacheptr, &iter, help_dict_oper)
|
RB_DICTIONARY_FOREACH(cacheptr, &iter, help_dict_oper)
|
||||||
{
|
{
|
||||||
rb_dictionary_delete(help_dict_oper, cacheptr->name);
|
rb_dictionary_delete(help_dict_oper, cacheptr->name);
|
||||||
free_cachefile(cacheptr);
|
free_cachefile(cacheptr);
|
||||||
}
|
}
|
||||||
DICTIONARY_FOREACH(cacheptr, &iter, help_dict_user)
|
RB_DICTIONARY_FOREACH(cacheptr, &iter, help_dict_user)
|
||||||
{
|
{
|
||||||
rb_dictionary_delete(help_dict_user, cacheptr->name);
|
rb_dictionary_delete(help_dict_user, cacheptr->name);
|
||||||
free_cachefile(cacheptr);
|
free_cachefile(cacheptr);
|
||||||
|
|
|
@ -175,7 +175,7 @@ capability_index_list(struct CapabilityIndex *idx, unsigned int cap_mask)
|
||||||
|
|
||||||
*t = '\0';
|
*t = '\0';
|
||||||
|
|
||||||
DICTIONARY_FOREACH(entry, &iter, idx->cap_dict)
|
RB_DICTIONARY_FOREACH(entry, &iter, idx->cap_dict)
|
||||||
{
|
{
|
||||||
if ((1 << entry->value) & cap_mask)
|
if ((1 << entry->value) & cap_mask)
|
||||||
{
|
{
|
||||||
|
@ -199,7 +199,7 @@ capability_index_mask(struct CapabilityIndex *idx)
|
||||||
|
|
||||||
s_assert(idx != NULL);
|
s_assert(idx != NULL);
|
||||||
|
|
||||||
DICTIONARY_FOREACH(entry, &iter, idx->cap_dict)
|
RB_DICTIONARY_FOREACH(entry, &iter, idx->cap_dict)
|
||||||
{
|
{
|
||||||
if (!(entry->flags & CAP_ORPHANED))
|
if (!(entry->flags & CAP_ORPHANED))
|
||||||
mask |= (1 << entry->value);
|
mask |= (1 << entry->value);
|
||||||
|
@ -217,7 +217,7 @@ capability_index_get_required(struct CapabilityIndex *idx)
|
||||||
|
|
||||||
s_assert(idx != NULL);
|
s_assert(idx != NULL);
|
||||||
|
|
||||||
DICTIONARY_FOREACH(entry, &iter, idx->cap_dict)
|
RB_DICTIONARY_FOREACH(entry, &iter, idx->cap_dict)
|
||||||
{
|
{
|
||||||
if (!(entry->flags & CAP_ORPHANED) && (entry->flags & CAP_REQUIRED))
|
if (!(entry->flags & CAP_ORPHANED) && (entry->flags & CAP_REQUIRED))
|
||||||
mask |= (1 << entry->value);
|
mask |= (1 << entry->value);
|
||||||
|
@ -241,7 +241,7 @@ capability_index_stats(void (*cb)(const char *line, void *privdata), void *privd
|
||||||
snprintf(buf, sizeof buf, "'%s': allocated bits - %d", idx->name, (idx->highest_bit - 1));
|
snprintf(buf, sizeof buf, "'%s': allocated bits - %d", idx->name, (idx->highest_bit - 1));
|
||||||
cb(buf, privdata);
|
cb(buf, privdata);
|
||||||
|
|
||||||
DICTIONARY_FOREACH(entry, &iter, idx->cap_dict)
|
RB_DICTIONARY_FOREACH(entry, &iter, idx->cap_dict)
|
||||||
{
|
{
|
||||||
snprintf(buf, sizeof buf, "bit %d: '%s'", entry->value, entry->cap);
|
snprintf(buf, sizeof buf, "bit %d: '%s'", entry->value, entry->cap);
|
||||||
cb(buf, privdata);
|
cb(buf, privdata);
|
||||||
|
|
|
@ -47,7 +47,7 @@ struct DictionaryIter
|
||||||
/*
|
/*
|
||||||
* this is a convenience macro for inlining iteration of dictionaries.
|
* this is a convenience macro for inlining iteration of dictionaries.
|
||||||
*/
|
*/
|
||||||
#define DICTIONARY_FOREACH(element, state, dict) for (rb_dictionary_foreach_start((dict), (state)); (element = rb_dictionary_foreach_cur((dict), (state))); rb_dictionary_foreach_next((dict), (state)))
|
#define RB_DICTIONARY_FOREACH(element, state, dict) for (rb_dictionary_foreach_start((dict), (state)); (element = rb_dictionary_foreach_cur((dict), (state))); rb_dictionary_foreach_next((dict), (state)))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* rb_dictionary_create_named() creates a new dictionary tree which has a name.
|
* rb_dictionary_create_named() creates a new dictionary tree which has a name.
|
||||||
|
|
|
@ -171,7 +171,7 @@ clicap_generate(struct Client *source_p, const char *subcmd, int flags)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DICTIONARY_FOREACH(entry, &iter, cli_capindex->cap_dict)
|
RB_DICTIONARY_FOREACH(entry, &iter, cli_capindex->cap_dict)
|
||||||
{
|
{
|
||||||
size_t caplen = 0;
|
size_t caplen = 0;
|
||||||
struct ClientCapability *clicap = entry->ownerdata;
|
struct ClientCapability *clicap = entry->ownerdata;
|
||||||
|
|
|
@ -287,7 +287,7 @@ stats_delay(struct Client *source_p)
|
||||||
struct nd_entry *nd;
|
struct nd_entry *nd;
|
||||||
struct DictionaryIter iter;
|
struct DictionaryIter iter;
|
||||||
|
|
||||||
DICTIONARY_FOREACH(nd, &iter, nd_dict)
|
RB_DICTIONARY_FOREACH(nd, &iter, nd_dict)
|
||||||
{
|
{
|
||||||
sendto_one_notice(source_p, ":Delaying: %s for %ld",
|
sendto_one_notice(source_p, ":Delaying: %s for %ld",
|
||||||
nd->name, (long) nd->expire);
|
nd->name, (long) nd->expire);
|
||||||
|
@ -738,7 +738,7 @@ stats_messages(struct Client *source_p)
|
||||||
struct Message *msg;
|
struct Message *msg;
|
||||||
struct alias_entry *amsg;
|
struct alias_entry *amsg;
|
||||||
|
|
||||||
DICTIONARY_FOREACH(msg, &iter, cmd_dict)
|
RB_DICTIONARY_FOREACH(msg, &iter, cmd_dict)
|
||||||
{
|
{
|
||||||
s_assert(msg->cmd != NULL);
|
s_assert(msg->cmd != NULL);
|
||||||
sendto_one_numeric(source_p, RPL_STATSCOMMANDS,
|
sendto_one_numeric(source_p, RPL_STATSCOMMANDS,
|
||||||
|
@ -747,7 +747,7 @@ stats_messages(struct Client *source_p)
|
||||||
msg->bytes, msg->rcount);
|
msg->bytes, msg->rcount);
|
||||||
}
|
}
|
||||||
|
|
||||||
DICTIONARY_FOREACH(amsg, &iter, alias_dict)
|
RB_DICTIONARY_FOREACH(amsg, &iter, alias_dict)
|
||||||
{
|
{
|
||||||
s_assert(amsg->name != NULL);
|
s_assert(amsg->name != NULL);
|
||||||
sendto_one_numeric(source_p, RPL_STATSCOMMANDS,
|
sendto_one_numeric(source_p, RPL_STATSCOMMANDS,
|
||||||
|
|
Loading…
Reference in a new issue