Skip to content
MapInitWithDeepCopy

MapInitWithDeepCopy

Description

Initialize a map with deep-copy callbacks for keys and values.

Usage example (Cross-references)

Usage examples (Cross-references)
    
        CityGraph graph = GraphInitWithDeepCopy(NULL, str_deinit, &alloc);
        CityIndex index = MapInitWithDeepCopy(str_hash, str_compare, str_init_copy, str_deinit, NULL, NULL, &alloc);
    
        // The helpers take const Str *. Build one stack Str per literal and
        typedef Map(Zstr, Zstr) ZstrMap;
        DefaultAllocator alloc = DefaultAllocatorInit();
        ZstrMap          map   = MapInitWithDeepCopy(
            zstr_hash,
            zstr_compare,
        typedef Map(Zstr, Zstr) ZstrMap;
        DefaultAllocator alloc = DefaultAllocatorInit();
        ZstrMap          map   = MapInitWithDeepCopy(
            zstr_hash,
            zstr_compare,
Last updated on