cython-build: Add more magic translators

Signed-off-by: Michael Buesch <m@bues.ch>
Add some cython type annotations to the code

Signed-off-by: Michael Buesch <m@bues.ch>