This is an automated email from the ASF dual-hosted git repository. jensg pushed a commit to branch 0.23.0 in repository https://gitbox.apache.org/repos/asf/thrift.git
commit 0f8ec9c1014ed21acc324aaa421017fb164e9608 Author: Jens Geyer <[email protected]> AuthorDate: Sat Apr 11 12:29:31 2026 +0200 Fix parent class resolution in c_glib generated dispatch_call Client: c_glib Use g_type_class_peek() with the processor type ID instead of GET_CLASS(self) when looking up the parent class in generated dispatch_call. GET_CLASS(self) returns the runtime class of the instance, which may differ from the class defining the method when service inheritance is used, leading to incorrect dispatch. (10) Co-Authored-By: Claude Opus 4.6 <[email protected]> --- compiler/cpp/src/thrift/generate/t_c_glib_generator.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/cpp/src/thrift/generate/t_c_glib_generator.cc b/compiler/cpp/src/thrift/generate/t_c_glib_generator.cc index 1c183b8f2..3373908ba 100644 --- a/compiler/cpp/src/thrift/generate/t_c_glib_generator.cc +++ b/compiler/cpp/src/thrift/generate/t_c_glib_generator.cc @@ -2594,8 +2594,8 @@ void t_c_glib_generator::generate_service_processor(t_service* tservice) { f_service_ << indent() << parent_class_name << "Class " "*parent_class =" << '\n'; indent_up(); - f_service_ << indent() << "g_type_class_peek_parent (" << class_name_uc << "_GET_CLASS (self));" - << '\n'; + f_service_ << indent() << "g_type_class_peek_parent (g_type_class_peek (" + << class_name_lc << "_get_type ()));" << '\n'; indent_down(); f_service_ << '\n' << indent() << "process_function_def = "
