# \[patch\] Add various functions and fixed to rbgst-pad

**URL:** <https://www.ruby-forum.com/t/patch-add-various-functions-and-fixed-to-rbgst-pad/133304>\
**Category:** Ruby-Gnome 2\
**Created:** [March 29, 2008, 9:28pm UTC](https://www.ruby-forum.com/t/patch-add-various-functions-and-fixed-to-rbgst-pad/133304 "2008-03-29T21:28:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sschunselaar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/34f0e0/32.png) [@sschunselaar](https://www.ruby-forum.com/u/sschunselaar)\
**Post date:** [March 29, 2008, 9:28pm UTC](https://www.ruby-forum.com/t/patch-add-various-functions-and-fixed-to-rbgst-pad/133304/1 "2008-03-29T21:28:12Z")

</div>

Hi,

See attached patch

```
Sjoerd
```

---

<div class="post-metadata">

**Author:** ![sschunselaar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/34f0e0/32.png) [@sschunselaar](https://www.ruby-forum.com/u/sschunselaar)\
**Post date:** [March 30, 2008, 1:02am UTC](https://www.ruby-forum.com/t/patch-add-various-functions-and-fixed-to-rbgst-pad/133304/2 "2008-03-30T01:02:56Z")

</div>

Hi,

In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
“[ruby-gnome2-devel-en] [patch] Add various functions and fixed to  
rbgst-pad” on Sat, 29 Mar 2008 21:27:24 +0100,  
Sjoerd S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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
