Exemplo n.º 1
0
/* hash_multimap_t */
void _type_init_hash_multimap(const void* cpv_input, void* pv_output)
{
    bool_t b_result = false;
    assert(cpv_input != NULL && pv_output != NULL);

    b_result = _create_hash_multimap_auxiliary((hash_multimap_t*)cpv_input, (char*)pv_output);
    assert(b_result);
    hash_multimap_init((hash_multimap_t*)cpv_input);
}
/**
 * Create hash_multimap container.
 */
hash_multimap_t* _create_hash_multimap(const char* s_typename)
{
    hash_multimap_t* phmmap_map = NULL;

    if((phmmap_map = (hash_multimap_t*)malloc(sizeof(hash_multimap_t))) == NULL)
    {
        return NULL;
    }

    if(!_create_hash_multimap_auxiliary(phmmap_map, s_typename))
    {
        free(phmmap_map);
        return NULL;
    }

    return phmmap_map;
}