+2006-09-15 Adam Roben <aroben@apple.com>
+
+ Reviewed by eseidel.
+
+ Fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=10876
+ containsItemForURLUnicode uses matchLetter instead of
+ matchUnicodeLetter
+
+ Small fixes for _WebCoreHistoryProvider.
+
+ * History/WebHistory.m: Consistently use BUFFER_SIZE #define
+ (-[_WebCoreHistoryProvider containsItemForURLLatin1:length:]):
+ (-[_WebCoreHistoryProvider containsItemForURLUnicode:length:]):
+ Replace incorrect call to matchLetter to matchUnicodeLetter
+
2006-09-13 Brady Eidson <beidson@apple.com>
Reviewed by Maciej
}
if (needToAddSlash) {
- if (length + 1 <= 2048) {
+ if (length + 1 <= BUFFER_SIZE) {
strBuffer = staticStrBuffer;
} else {
strBuffer = malloc(length + 2);
return result;
}
+#define UNICODE_BUFFER_SIZE 1024
+
- (BOOL)containsItemForURLUnicode:(const UniChar *)unicode length:(unsigned)length
{
const UniChar *unicodeStr = unicode;
- UniChar staticStrBuffer[1024];
+ UniChar staticStrBuffer[UNICODE_BUFFER_SIZE];
UniChar *strBuffer = NULL;
BOOL needToAddSlash = FALSE;
matchUnicodeLetter(unicode[2], 't') &&
matchUnicodeLetter(unicode[3], 'p') &&
(unicode[4] == ':'
- || (matchLetter(unicode[4], 's') && unicode[5] == ':'))) {
+ || (matchUnicodeLetter(unicode[4], 's') && unicode[5] == ':'))) {
unsigned pos = unicode[4] == ':' ? 5 : 6;
}
if (needToAddSlash) {
- if (length + 1 <= 1024) {
+ if (length + 1 <= UNICODE_BUFFER_SIZE) {
strBuffer = staticStrBuffer;
} else {
strBuffer = malloc(sizeof(UniChar) * (length + 1));