api_generator:cpp:fix callback issue