ObjFW  Diff

Differences From Artifact [d6f1d8e020]:

To Artifact [aa0351ec1a]:


114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
	memcpy(string + length, str, strlength + 1);
	length += strlength;

	return self;
}

- appendCStringWithoutUTF8Checking: (const char*)str
			 andLength: (size_t)len
{
	if (len > strlen(str))
		@throw [OFOutOfRangeException newWithClass: isa];

	string = [self resizeMemory: string
			     toSize: length + len + 1];
	memcpy(string + length, str, len);







|







114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
	memcpy(string + length, str, strlength + 1);
	length += strlength;

	return self;
}

- appendCStringWithoutUTF8Checking: (const char*)str
			    length: (size_t)len
{
	if (len > strlen(str))
		@throw [OFOutOfRangeException newWithClass: isa];

	string = [self resizeMemory: string
			     toSize: length + len + 1];
	memcpy(string + length, str, len);
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
- appendWithFormat: (OFString*)fmt, ...
{
	id ret;
	va_list args;

	va_start(args, fmt);
	ret = [self appendWithFormat: fmt
			andArguments: args];
	va_end(args);

	return ret;
}

- appendWithFormat: (OFString*)fmt
      andArguments: (va_list)args
{
	char *t;

	if (fmt == NULL)
		@throw [OFInvalidFormatException newWithClass: isa];

	if ((vasprintf(&t, [fmt cString], args)) == -1)







|






|







140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
- appendWithFormat: (OFString*)fmt, ...
{
	id ret;
	va_list args;

	va_start(args, fmt);
	ret = [self appendWithFormat: fmt
			   arguments: args];
	va_end(args);

	return ret;
}

- appendWithFormat: (OFString*)fmt
	 arguments: (va_list)args
{
	char *t;

	if (fmt == NULL)
		@throw [OFInvalidFormatException newWithClass: isa];

	if ((vasprintf(&t, [fmt cString], args)) == -1)