GNOME Bugzilla – Bug 518932
Expose gst_segment_copy() to facilitate wrapping of GstSegment by glibmm
Last modified: 2008-04-09 22:39:13 UTC
Hi. Would it be possible to declare gst_segment_copy() in gstsegment.h? This would allow glibmm to wrap GstSegment (for C++ API) easier. If so, would this patch work? Thanks.
Created attachment 106027 [details] [review] Patch declaring gst_segment_copy() in gstsegment.h
If you make gst_segment_copy() public, you should also provide a gtk-doc chunk for it. Alternatively you could use copy = g_boxed_copy (GST_TYPE_SEGMENT, segment);
Thanks. Um...This, as in bug #518934, has to do with how glibmm automatically works with some types. It assumes that a boxed typed will have a single parameter copy() function named after the type in lowercase with underscores between the words (for example gst_segment_copy() in the case of GstSegment) and use that to generate C++ constructors. glibmm lets you specify the function name in the *.hg file so your suggestion almost worked, but processing failed because g_boxed_copy() uses two arguments. :-) Would the new patch be better accepted? Thanks.
Created attachment 106038 [details] [review] New patch with gtk doc block
(In reply to comment #3) > > Would the new patch be better accepted? Thanks. > I would guess not since the gtkmm block was done badly. Apologies. Is last patch better?
Created attachment 106039 [details] [review] Better gtkdoc block
Thanks, committed with additional Since: 0.10.20 marker in the gtk-doc blurb: 2008-04-09 Tim-Philipp Müller <tim at centricular dot net> Patch by: José Alburquerque <jaalburqu at svn dot gnome dot org> * docs/gst/gstreamer-sections.txt: * gst/gstsegment.c: * gst/gstsegment.h: * win32/common/libgstreamer.def: Expose gst_segment_copy() to make things easier for the c++ bindings. Fixes #518932. API: gst_segment_copy()