Changeset 5644:ebfbaab396d7 in roaraudio for libroar


Ignore:
Timestamp:
09/11/12 20:21:00 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

Improved kstore API (See: #317)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/kstore.c

    r5443 r5644  
    211211} 
    212212 
     213const char *         roar_kstore_name(struct roar_kstore * store, const void * obj) { 
     214 size_t i; 
     215 
     216 if ( store == NULL ) { 
     217  roar_err_set(ROAR_ERROR_FAULT); 
     218  return NULL; 
     219 } 
     220 
     221 for (i = 0; i < store->len; i++) 
     222  if ( store->kv[i].key != NULL && store->kv[i].value == obj ) 
     223   return store->kv[i].key; 
     224 
     225 roar_err_set(ROAR_ERROR_NOENT); 
     226 return NULL; 
     227} 
     228 
    213229//ll 
Note: See TracChangeset for help on using the changeset viewer.