# Proposed ? Qtrue : QFalse cleanup fix

**URL:** <https://www.ruby-forum.com/t/proposed-qtrue-qfalse-cleanup-fix/109328>\
**Category:** Ruby-Gnome 2\
**Created:** [July 13, 2007, 2:26pm UTC](https://www.ruby-forum.com/t/proposed-qtrue-qfalse-cleanup-fix/109328 "2007-07-13T14:26:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [July 13, 2007, 2:26pm UTC](https://www.ruby-forum.com/t/proposed-qtrue-qfalse-cleanup-fix/109328/1 "2007-07-13T14:26:20Z")

</div>

Please find attached the proposed qtrue-qfalse cleanup patch.

I’ve reviewed it line by line but I figured out some might want to  
have a look on it.

Also, I’d be interested if someone could test on a rb/gnome application.

---

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [July 13, 2007, 3:14pm UTC](https://www.ruby-forum.com/t/proposed-qtrue-qfalse-cleanup-fix/109328/2 "2007-07-13T15:14:31Z")

</div>

Am Freitag, den 13.07.2007, 14:23 +0200 schrieb Guillaume C.:

> Please find attached the proposed qtrue-qfalse cleanup patch.
> 
> I’ve reviewed it line by line but I figured out some might want to  
> have a look on it.
> 
> Also, I’d be interested if someone could test on a rb/gnome application.

Hi Guillaume,

I’ve testet it with KlÃ¶tzle - 5k lines of ruby code and 2k lines of C  
extensions - and all looks normal.

Cheers  
detlef

Ps. i didn’t reviewed the patch.

> * * *
> 
> This [SF.net](http://SF.net) email is sponsored by DB2 Express  
> Download DB2 Express C - the FREE version of DB2 express and take  
> control of your XML. No limits. Just data. Click to get it now.  
> [http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)  
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ ruby-gnome2-devel-en mailing list removed\_email\_address@domain.invalid [https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en](https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en)

* * *

This [SF.net](http://SF.net) email is sponsored by DB2 Express  
Download DB2 Express C - the FREE version of DB2 express and take  
control of your XML. No limits. Just data. Click to get it now.  
[http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)

---

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [July 13, 2007, 4:15pm UTC](https://www.ruby-forum.com/t/proposed-qtrue-qfalse-cleanup-fix/109328/3 "2007-07-13T16:15:39Z")

</div>

Hi,

Great job, thanks.

I checked youra patch, and find 2 bugs.  
Others are OK.

Please check in to CVS.

On Fri, 13 Jul 2007 14:23:01 +0200  
“Guillaume C.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> static VALUE  
> @@ -87,14 +87,14 @@  
> VALUE obj;  
> gnome\_config\_get\_vector\_with\_default(RVAL2CSTR(path), &argc, &argv, &def);  
> if (argc == 0)
> 
> - 
> 
> ```
> return rb_ary_new3(2, Qnil, def ? Qtrue : Qfalse);
> 
> ```
> 
> - 
> 
> ```
> return CBOOL2RVAL(rb_ary_new3(2, Qnil, def));
> 
> ```

This should be  
return rb\_ary\_new3(2, Qnil, CBOOL2RVAL(def));

> ```
> case POPT_ARG_NONE:
> 
> ```
> 
> - 
> 
> ```
> return option->arg ? (*((int *)option->arg) ? Qtrue : Qfalse) : Qnil;
> 
> ```
> 
> - 
> 
> ```
> return option->arg ? CBOOL2RVAL(*((int *)option->arg)) : Qnil;
> 
> ```
> 
> - 
> 
> ```
> return CBOOL2RVAL(option->arg ? (*((int *)option->arg))) : Qnil;
> 
> ```

Don’t need the last line.

–  
.:% Masao M.[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

* * *

This [SF.net](http://SF.net) email is sponsored by DB2 Express  
Download DB2 Express C - the FREE version of DB2 express and take  
control of your XML. No limits. Just data. Click to get it now.  
[http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)
