adding macro and changed static function calls
bugs fixed at CSourceGenerator