Ignore:
Timestamp:
2015-05-15T10:17:12Z (9 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Children:
63b017e
Parents:
600e09c
Message:

Don't use GLib 2.32+ g_hash_table_add/_contains functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/rpc/rpc.c

    r600e09c r513be3b  
    789789        ret->func = rpc_ ## func
    790790#define RPC_ADD_OPT_FUNC(func) \
    791         if (g_hash_table_contains(methods, #func)) \
     791        if (g_hash_table_lookup(methods, #func)) \
    792792                RPC_ADD_FUNC(func)
    793793
     
    904904        JSON_Array *methods_a = json_object_get_array(isup, "method_list");
    905905        GHashTable *methods = g_hash_table_new(g_str_hash, g_str_equal);
    906         for (i = 0; i < json_array_get_count(methods_a); i++)
    907                 g_hash_table_add(methods, (void*) json_array_get_string(methods_a, i));
     906        for (i = 0; i < json_array_get_count(methods_a); i++) {
     907                gpointer func = (void*) json_array_get_string(methods_a, i);
     908                g_hash_table_replace(methods, func, func);
     909        }
    908910
    909911        ret->init = rpc_init;
Note: See TracChangeset for help on using the changeset viewer.