Re: reduce compiler warnings (win32)
| From: | Steph | Date: | Sun, 11 Sep 2005 08:14:40 +0000 |
| Subject: | Re: reduce compiler warnings (win32) | ||
| References: | 1 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-1621@lists.php.net to get a copy of this message | ||
S'funny, I was doing that last night too (and went the new-class-for-floats
route).
We need to test both options - both get rid of compiler warnings. Yours is
prettier.
The other two are code-related - need to check them with Andrei.
- Steph
----- Original Message -----
From: "Tom Rogers" <trogers@kwikin.com>
To: "PHP-GTK dev" <php-gtk-dev@lists.php.net>
Cc: "Andrei" <andrei@gravitonic.com>; "Steph" <steph@zend.com>
Sent: Sunday, September 11, 2005 6:01 AM
Subject: [PHP-GTK-DEV] reduce compiler warnings (win32)
> Hi
>
> Here is a patch to get rid of compiler warnings:
>
> conversion from 'double ' to 'float ', possible loss of data
>
> RCS file: /repository/php-gtk/generator/arg_types.php,v
> retrieving revision 1.73
> diff -u -w -b -r1.73 arg_types.php
> --- arg_types.php 3 Sep 2005 19:06:12 -0000 1.73
> +++ arg_types.php 11 Sep 2005 04:55:00 -0000
> @@ -300,8 +300,11 @@
> $info->var_list->add('double', $name . ' = ' .
> $default);
> else
> $info->var_list->add('double', $name);
> - $info->arg_list[] = $name;
> $info->add_parse_list('d', '&' . $name);
> + if($type == 'gfloat')
> + $info->arg_list[] = "(float)$name";
> + else
> + $info->arg_list[] = $name;
> }
>
> function write_return($type, $owns_return, $info)
>
>
> Or should there be a whole new class for floats ?
>
> --
>
> Tom
>
> --
> PHP-GTK Development Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>