Logo Search packages:      
Sourcecode: libnl version File versions  Download package

void nl_cache_delete ( struct nl_cache *  cache,
struct nl_object *  obj 
)

Delete an element from a cache.

  • cache cache to delete the element from
  • obj Object to delete
Deletes the object obj from the cache cache.

Definition at line 349 of file cache.c.

References nl_object_put().

Referenced by nl_cache_destroy().

{
      if (obj->ce_cache != cache)
            BUG();

      nl_list_del(&obj->ce_list);
      nl_object_put(obj);
      cache->c_nitems--;
      obj->ce_cache = NULL;

      NL_DBG(1, "Deleted %p from cache %p.\n", obj, cache);
}


Generated by  Doxygen 1.6.0   Back to index