Show
Ignore:
Timestamp:
09/21/08 21:59:57 (4 months ago)
Author:
karpet
Message:

store codepoints instead of start_byte (since we no longer need the latter); optimize the context storage a little to reduce number of malloc/frees

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • libswish3/trunk/src/libswish3/hash.c

    r2135 r2166  
    5858 
    5959    return ret; 
     60} 
     61 
     62int 
     63swish_hash_exists_or_add( 
     64    xmlHashTablePtr hash, 
     65    xmlChar *key, 
     66    xmlChar *value 
     67) 
     68{ 
     69    if (!swish_hash_exists(hash, key)) { 
     70        return swish_hash_add(hash, key, swish_xstrdup( value )); 
     71    } 
     72    else { 
     73        return 1; 
     74    } 
    6075} 
    6176