On 6/21/07, Murray Cumming <[EMAIL PROTECTED]> wrote:


I think you need a convert.m4 file, which includes the others, here:
http://svn.beep-media-player.org/gstreamermm/trunk/tools/m4/

For instance:

http://svn.gnome.org/viewcvs/gtksourceviewmm/trunk/tools/m4/convert.m4?view=markup

If this fixes it, please submit a patch for the gmmproc appendix in the
book, or file a bug about it.


This works. Thanks! I'll submit a patch for the gmmproc docs.

Now there is another problem. I end up with literal _CONVERT macros inside
the code which to my understanding should be post-processed again (it seems
like it's a 2-stage thing where it picks up code, creates _CONVERT macros,
which are then processed again).

But, the code still contains stuff like (i've prepended the namespace here,
since it's Gst::Object, not Glib::Object, just making sure..):

<code>
bool Gst::Object::set_name(const Glib::ustring& name)
{
 return
_CONVERT(gboolean,bool,gst_object_set_name`'(ifelse(`',1,const_cast<__CNAME__*>(gobj()),gobj())`'ifelse(`_CONVERT(const
Glib::ustring&,gchar*,name,0)',,,`, ')_CONVERT(const
Glib::ustring&,gchar*,name,0)));
}
</code>

The wrapper inside gstobject.hg looks like this:
<code>
 _WRAP_METHOD(bool set_name (const Glib::ustring& name),
gst_object_set_name)
</code>

I have this here in gst_method.defs:
<code>
(define-method set_name
 (of-object "GstObject")
 (c-name "gst_object_set_name")
 (return-type "gboolean")
 (parameters
   '("gchar*" "name")
 )
)
</code>

And also basic conversion definitions for the basic pointer conversions
inside convert_gst.m4 (which now works thanks to the previous hint, thanks
again!)

_CONVERSION(`GstObject*',`Glib::RefPtr<Gst::Object>',`Glib::wrap($3)')
_CONVERSION(`Glib::RefPtr<Gst::Object>',`GstObject*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`Glib::RefPtr<Gst::Object>&',`GstObject*',__CONVERT_REFPTR_TO_P)

What could be wrong?

--Milosz
_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to