GNOME Bugzilla – Bug 732413
*_CLASS macro name does not take lower_case_cprefix into account
Last modified: 2014-07-01 23:42:59 UTC
https://bugzilla.gnome.org/show_bug.cgi?id=723910#c32 I think we should just abandon trying to call the macro and just cast to the FooClass* pointer ourselves. Pretty generated C is a lost cause, and the type name is more reliable. That said, if we really want to keep using the macro we should probably use lower_case_cprefix.ascii_up().
Created attachment 279517 [details] [review] codegen: cast instead of trying to guess *_CLASS macro name Should probably run this through staging first, but I think it's right.
Ok for me as long as it passes staging.
works, but I have warnings. src/rtsp/MediaFactory.c:489:55: Warnung: Zuweisung von inkompatiblem Zeigertyp ((GstRTSPMediaFactoryClass *) klass)->create_element = dvb_media_factory_real_create_element; ^ src/rtsp/MediaFactory.c:490:56: Warnung: Zuweisung von inkompatiblem Zeigertyp ((GstRTSPMediaFactoryClass *) klass)->create_pipeline = dvb_media_factory_real_create_pipeline;
The warnings are unrelated to this bug. They are caused by the parameter being generated as GstPipeline* instead of GstElement*.
any chance to go into master git?
commit 49beca7a8b8e7a0f3988eb987baeb64021cdeae4 Author: Evan Nemerson <evan@nemerson.com> Date: Sun Jun 29 00:26:39 2014 -0700 codegen: cast instead of trying to guess *_CLASS macro name Fixes bug 732413