Changeset 5494


Ignore:
Timestamp:
Dec 7, 2016 3:24:16 AM (2 years ago)
Author:
ming
Message:

Fixed #1984: Remove the implementation of PJ_HASH_USE_OWN_TOLOWER

Location:
pjproject/trunk/pjlib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/include/pj/config_site_sample.h

    r5320 r5494  
    478478#   define PJSIP_SAFE_MODULE            0 
    479479#   define PJ_HAS_STRICMP_ALNUM         0 
    480 #   define PJ_HASH_USE_OWN_TOLOWER      1 
    481480#   define PJSIP_UNESCAPE_IN_PLACE      1 
    482481 
  • pjproject/trunk/pjlib/src/pj/hash.c

    r4537 r5494  
    7777    long i; 
    7878 
    79 #if defined(PJ_HASH_USE_OWN_TOLOWER) && PJ_HASH_USE_OWN_TOLOWER != 0 
    80     for (i=0; i<key->slen; ++i) { 
    81         pj_uint8_t c = key->ptr[i]; 
    82         char lower; 
    83         if (c & 64) 
    84             lower = (char)(c | 32); 
    85         else 
    86             lower = (char)c; 
    87         if (result) 
    88             result[i] = lower; 
    89         hval = hval * PJ_HASH_MULTIPLIER + lower; 
    90     } 
    91 #else 
    9279    for (i=0; i<key->slen; ++i) { 
    9380        char lower = (char)pj_tolower(key->ptr[i]); 
     
    9683        hval = hval * PJ_HASH_MULTIPLIER + lower; 
    9784    } 
    98 #endif 
    9985 
    10086    return hval; 
Note: See TracChangeset for help on using the changeset viewer.