Ignore:
Timestamp:
Apr 30, 2007 9:03:32 PM (17 years ago)
Author:
bennylp
Message:

Initial Symbian integration to trunk for pjlib

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/hash.c

    r1210 r1235  
    5656 
    5757    if (keylen==PJ_HASH_KEY_STRING) { 
    58         const unsigned char *p = key; 
     58        const pj_uint8_t *p = (const pj_uint8_t*)key; 
    5959        for ( ; *p; ++p ) { 
    6060            hash = (hash * PJ_HASH_MULTIPLIER) + *p; 
    6161        } 
    6262    } else { 
    63         const unsigned char *p = key, 
    64                             *end = p + keylen; 
     63        const pj_uint8_t *p = (const pj_uint8_t*)key, 
     64                              *end = p + keylen; 
    6565        for ( ; p!=end; ++p) { 
    6666            hash = (hash * PJ_HASH_MULTIPLIER) + *p; 
     
    104104    PJ_ASSERT_RETURN(sizeof(pj_hash_entry)==PJ_HASH_ENTRY_SIZE, NULL); 
    105105 
    106     h = pj_pool_alloc(pool, sizeof(pj_hash_table_t)); 
     106    h = PJ_POOL_ALLOC_T(pool, pj_hash_table_t); 
    107107    h->count = 0; 
    108108 
     
    120120     
    121121    h->rows = table_size; 
    122     h->table = pj_pool_calloc(pool, table_size+1, sizeof(pj_hash_entry*)); 
     122    h->table = (pj_hash_entry**) 
     123               pj_pool_calloc(pool, table_size+1, sizeof(pj_hash_entry*)); 
    123124    return h; 
    124125} 
     
    143144        hash=0; 
    144145        if (keylen==PJ_HASH_KEY_STRING) { 
    145             const unsigned char *p = key; 
     146            const pj_uint8_t *p = (const pj_uint8_t*)key; 
    146147            for ( ; *p; ++p ) { 
    147148                hash = hash * PJ_HASH_MULTIPLIER + *p; 
     
    149150            keylen = p - (const unsigned char*)key; 
    150151        } else { 
    151             const unsigned char *p = key, 
    152                                 *end = p + keylen; 
     152            const pj_uint8_t *p = (const pj_uint8_t*)key, 
     153                                  *end = p + keylen; 
    153154            for ( ; p!=end; ++p) { 
    154155                hash = hash * PJ_HASH_MULTIPLIER + *p; 
     
    180181     */ 
    181182    if (entry_buf) { 
    182         entry = entry_buf; 
     183        entry = (pj_hash_entry*)entry_buf; 
    183184    } else { 
    184185        /* Pool must be specified! */ 
    185186        PJ_ASSERT_RETURN(pool != NULL, NULL); 
    186187 
    187         entry = pj_pool_alloc(pool, sizeof(pj_hash_entry)); 
     188        entry = PJ_POOL_ALLOC_T(pool, pj_hash_entry); 
    188189        PJ_LOG(6, ("hashtbl",  
    189190                   "%p: New p_entry %p created, pool used=%u, cap=%u",  
Note: See TracChangeset for help on using the changeset viewer.