src/common/map.c
// Set a custom free function for use when destroying entries
Set a custom free function for use when destroying entries
Set a custom free function for use when destroying entries
void map_set_entry_free_function(struct map *map, map_entry_free_function_t function)
{
        if (map->setting_flags & MAP_FLAG_USE_FREE) {
                map_remove_setting_flag(map, MAP_FLAG_USE_FREE);
        }
        map->free_function = function;
        map_set_setting_flag(map, MAP_FLAG_USE_FREE_FUNC);
}
void map_set_entry_free_function ( struct map * map , map_entry_free_function_t function ) { if ( map -> setting_flags & MAP_FLAG_USE_FREE ) { map_remove_setting_flag ( map , MAP_FLAG_USE_FREE ) ; } map -> free_function = function ; map_set_setting_flag ( map , MAP_FLAG_USE_FREE_FUNC ) ; }
Set a custom free function for use when destroying entries
Set a custom free function for use when destroying entries