Changeset 102457 in vbox for trunk/src/libs/xpcom18a4/xpcom/ds
- Timestamp:
- Dec 4, 2023 5:24:33 PM (14 months ago)
- Location:
- trunk/src/libs/xpcom18a4/xpcom/ds
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/xpcom/ds/nsAtomTable.cpp
r101962 r102457 36 36 * 37 37 * ***** END LICENSE BLOCK ***** */ 38 #include <iprt/string.h> 38 39 39 40 #include "nsAtomTable.h" … … 181 182 const AtomTableEntry *he = NS_STATIC_CAST(const AtomTableEntry*, entry); 182 183 const char* keyStr = NS_STATIC_CAST(const char*, key); 183 return nsCRT::strcmp(keyStr, he->get()) == 0;184 return RTStrCmp(keyStr, he->get()) == 0; 184 185 } 185 186 -
trunk/src/libs/xpcom18a4/xpcom/ds/nsCRT.h
r102326 r102457 146 146 } 147 147 148 /// Compare s1 and s2.149 static PRInt32 strcmp(const char* s1, const char* s2) {150 return PRInt32(PL_strcmp(s1, s2));151 }152 153 static PRInt32 strncmp(const char* s1, const char* s2,154 PRUint32 aMaxLen) {155 return PRInt32(PL_strncmp(s1, s2, aMaxLen));156 }157 158 148 /// Case-insensitive string comparison. 159 149 static PRInt32 strcasecmp(const char* s1, const char* s2) { … … 169 159 result=-1; 170 160 return result; 171 }172 173 static PRInt32 strncmp(const char* s1, const char* s2, PRInt32 aMaxLen) {174 // inline the first test (assumes strings are not null):175 PRInt32 diff = ((const unsigned char*)s1)[0] - ((const unsigned char*)s2)[0];176 if (diff != 0) return diff;177 return PRInt32(PL_strncmp(s1,s2,unsigned(aMaxLen)));178 161 } 179 162
Note:
See TracChangeset
for help on using the changeset viewer.