C++ compatibility
MS Visual Studio 2008 support
Fix: Consistently use uint instead of unsigned int

Why use uint? It is easier to type and leads to more readable function
declarations.