0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-10-02 13:48:53 +02:00

DICTIONARY_FOREACH → RB_DICTIONARY_FOREACH

This is in librb and therefore should be prefixed.
This commit is contained in:
Elizabeth Myers 2016-03-23 07:45:44 -05:00
parent 28b856b7ce
commit 56f84dedf7
5 changed files with 11 additions and 11 deletions

View file

@ -243,12 +243,12 @@ load_help(void)
struct stat sb;
#endif
DICTIONARY_FOREACH(cacheptr, &iter, help_dict_oper)
RB_DICTIONARY_FOREACH(cacheptr, &iter, help_dict_oper)
{
rb_dictionary_delete(help_dict_oper, cacheptr->name);
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);
free_cachefile(cacheptr);

View file

@ -175,7 +175,7 @@ capability_index_list(struct CapabilityIndex *idx, unsigned int cap_mask)
*t = '\0';
DICTIONARY_FOREACH(entry, &iter, idx->cap_dict)
RB_DICTIONARY_FOREACH(entry, &iter, idx->cap_dict)
{
if ((1 << entry->value) & cap_mask)
{
@ -199,7 +199,7 @@ capability_index_mask(struct CapabilityIndex *idx)
s_assert(idx != NULL);
DICTIONARY_FOREACH(entry, &iter, idx->cap_dict)
RB_DICTIONARY_FOREACH(entry, &iter, idx->cap_dict)
{
if (!(entry->flags & CAP_ORPHANED))
mask |= (1 << entry->value);
@ -217,7 +217,7 @@ capability_index_get_required(struct CapabilityIndex *idx)
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))
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));
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);
cb(buf, privdata);

View file

@ -47,7 +47,7 @@ struct DictionaryIter
/*
* 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.

View file

@ -171,7 +171,7 @@ clicap_generate(struct Client *source_p, const char *subcmd, int flags)
return;
}
DICTIONARY_FOREACH(entry, &iter, cli_capindex->cap_dict)
RB_DICTIONARY_FOREACH(entry, &iter, cli_capindex->cap_dict)
{
size_t caplen = 0;
struct ClientCapability *clicap = entry->ownerdata;

View file

@ -287,7 +287,7 @@ stats_delay(struct Client *source_p)
struct nd_entry *nd;
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",
nd->name, (long) nd->expire);
@ -738,7 +738,7 @@ stats_messages(struct Client *source_p)
struct Message *msg;
struct alias_entry *amsg;
DICTIONARY_FOREACH(msg, &iter, cmd_dict)
RB_DICTIONARY_FOREACH(msg, &iter, cmd_dict)
{
s_assert(msg->cmd != NULL);
sendto_one_numeric(source_p, RPL_STATSCOMMANDS,
@ -747,7 +747,7 @@ stats_messages(struct Client *source_p)
msg->bytes, msg->rcount);
}
DICTIONARY_FOREACH(amsg, &iter, alias_dict)
RB_DICTIONARY_FOREACH(amsg, &iter, alias_dict)
{
s_assert(amsg->name != NULL);
sendto_one_numeric(source_p, RPL_STATSCOMMANDS,