reduce compiler warnings (win32)
| From: | Tom Rogers | Date: | Sun, 11 Sep 2005 05:01:47 +0000 |
| Subject: | reduce compiler warnings (win32) | ||
| Groups: | php.gtk.dev | ||
| Request: | Send a blank email to php-gtk-dev+get-1620@lists.php.net to get a copy of this message | ||
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