Forum: Ruby-Gnome 2 proposed ? Qtrue : QFalse cleanup fix

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Guillaume C. (Guest)
on 2007-07-13 16:26
(Received via mailing list)
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.
Detlef R. (Guest)
on 2007-07-13 17:14
(Received via mailing list)
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 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/
> _______________________________________________ ruby-gnome2-devel-en mailing list 
removed_email_address@domain.invalid 
https://lists.sourceforge.net/lists/listinfo/ruby-...


-------------------------------------------------------------------------
This 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/
Masao M. (Guest)
on 2007-07-13 18:15
(Received via mailing list)
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> 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>


-------------------------------------------------------------------------
This 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/
This topic is locked and can not be replied to.