ObjFW  Diff

Differences From Artifact [2bac621bba]:

To Artifact [c4e41efb24]:


102
103
104
105
106
107
108
109

110
111
112
113
114
115
116
102
103
104
105
106
107
108

109
110
111
112
113
114
115
116







-
+








	madvise((void*)str, len, MADV_NORMAL);

	return utf8;
}

size_t
of_string_unicode_to_utf8(uint32_t c, uint8_t *buf)
of_string_unicode_to_utf8(uint32_t c, char *buf)
{
	if (c < 0x80) {
		buf[0] = c;
		return 1;
	}
	if (c < 0x800) {
		buf[0] = 0xC0 | (c >> 6);