Differences From Artifact [69c4d2c798]:
- File src/OFXMLComment.m — part of check-in [c7f0229795] at 2020-01-02 01:51:34 on branch trunk — Update copyright (user: js, size: 3016) [annotate] [blame] [check-ins using] [more...]
To Artifact [2577a47d50]:
- File
src/OFXMLComment.m
— part of check-in
[0ddaac3f5b]
at
2020-11-05 00:24:29
on branch trunk
— Avoid -[allocMemoryWithSize:] for temporary memory
-[allocMemoryWithSize:] has book keeping overhead that is unnecessary
for temporary memory. (user: js, size: 2988) [annotate] [blame] [check-ins using] [more...]
| ︙ | ︙ | |||
86 87 88 89 90 91 92 | return false; comment = object; return ([comment->_comment isEqual: _comment]); } | | | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
return false;
comment = object;
return ([comment->_comment isEqual: _comment]);
}
- (unsigned long)hash
{
return _comment.hash;
}
- (OFString *)stringValue
{
return @"";
|
| ︙ | ︙ | |||
112 113 114 115 116 117 118 |
- (OFString *)XMLStringWithIndentation: (unsigned int)indentation
level: (unsigned int)level
{
OFString *ret;
if (indentation > 0 && level > 0) {
| < | | | 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
- (OFString *)XMLStringWithIndentation: (unsigned int)indentation
level: (unsigned int)level
{
OFString *ret;
if (indentation > 0 && level > 0) {
char *whitespaces = of_malloc((level * indentation) + 1, 1);
memset(whitespaces, ' ', level * indentation);
whitespaces[level * indentation] = 0;
@try {
ret = [OFString stringWithFormat: @"%s<!--%@-->",
whitespaces,
_comment];
} @finally {
free(whitespaces);
}
} else
ret = [OFString stringWithFormat: @"<!--%@-->", _comment];
return ret;
}
|
| ︙ | ︙ |