Ruby Forum Ruby-Gnome 2 > [patch] Add various functions and fixed to rbgst-pad

Posted by Sjoerd Simons (Guest)
on 29.03.2008 21:28
Attachment: get-pad.patch (6,7 KB)
(Received via mailing list)
Hi,

  See attached patch

    Sjoerd
Posted by Kouhei Sutou (Guest)
on 30.03.2008 01:02
(Received via mailing list)
Hi,

In <20080329202724.GA22568@beast.luon.net>
  "[ruby-gnome2-devel-en] [patch] Add various functions and fixed to 
rbgst-pad" on Sat, 29 Mar 2008 21:27:24 +0100,
  Sjoerd Simons <sjoerd@luon.net> wrote:

>   See attached patch

It was very happy for us if you considered to follow our
coding-style.

> +    if (!rb_obj_is_kind_of(other_pad, cGstPad)) {

Use RVAL2CBOOL not !.

> +rb_gst_pad_link2 (VALUE self, VALUE other_pad)  {

Too bad name.

> +    ret = GOBJ2RVAL(pad);
> +    /* gst_pad_get_peer gave us a ref, which we don't need anymore so drop it */
> +    g_object_unref (pad);
> +    return ret;

Use GOBJ2RVAL_UNREF.

> +  rb_define_alias(c, "caps=", "set_caps");

Use G_DEF_SETTERS.


Others are OK for me.


Thanks,
--
kou