ObjFW  Diff

Differences From Artifact [f44982b7c8]:

To Artifact [fb7ee6732e]:


1574
1575
1576
1577
1578
1579
1580

1581
1582

1583
1584


1585
1586
1587


1588
1589

1590
1591
1592
1593
1594
1595
1596
1574
1575
1576
1577
1578
1579
1580
1581
1582

1583
1584

1585
1586
1587


1588
1589
1590

1591
1592
1593
1594
1595
1596
1597
1598







+

-
+

-
+
+

-
-
+
+

-
+







	}

	return value;
}

- (of_unichar_t*)unicodeString
{
	OFObject *object = [[[OFObject alloc] init] autorelease];
	of_unichar_t *ret;
	size_t i, j, len;
	size_t i, j;

	len = [self length];
	ret = [object allocMemoryForNItems: [self length] + 2
				  withSize: sizeof(of_unichar_t)];

	if ((ret = malloc((len + 1) * sizeof(of_unichar_t))) == NULL)
		@throw [OFOutOfMemoryException newWithClass: isa];
	i = 0;
	j = 0;

	i = j = 0;
	ret[j++] = 0xFEFF;

	while (i < length) {
		of_unichar_t c;
		size_t cLen;

		cLen = of_string_utf8_to_unicode(string + i, length - i, &c);