Do not assume that gsize and unsigned int are the same thing. If you look too quickly at the doc, you might think it's true. But the text that you didn't read because you didn't take ten seconds for this is clear about it and you might end up with some bad bug.