additional python 2/3 compay macros
cast return from CgVar.get_type() to int for python 2/3 compatibility