>>> On 7/13/2012 at  1:16 AM, Jeffrey Ray <jeffrey.hall...@gmail.com> wrote:
> I attempted compile the perl bindings (version 1.261) I get this output
> error when running perl Makefile.pl
> 
> GMainLoop.xs: In function `XS_Glib__IO_add_watch':
> 
> GMainLoop.xs:556: warning: passing arg 1 of `g_io_channel_win32_new_socket'
> make
> s integer from pointer without a cast
> 

Just a casting issue. It casts it to a HANDLE, but win32_get_osfhandle returns 
a intptr_t, and g_io_channel_win32_new_socket expects a gint.

Attached fixes it.


Regards,
Martin



Vrywaringsklousule / Disclaimer:  
http://www.nwu.ac.za/it/gov-man/disclaimer.html 

diff --git a/GMainLoop.xs b/GMainLoop.xs
index 38e2c38..e11b6f8 100644
--- a/GMainLoop.xs
+++ b/GMainLoop.xs
@@ -553,7 +553,7 @@ g_io_add_watch (class, fd, condition, callback, data=NULL, 
priority=G_PRIORITY_D
     CODE:
 #ifdef USE_SOCKETS_AS_HANDLES
         /* native win32 doesn't have fd's, so first convert perls fd into a 
winsock fd */
-        channel = g_io_channel_win32_new_socket ((HANDLE)win32_get_osfhandle 
(fd));
+        channel = g_io_channel_win32_new_socket ((gint)win32_get_osfhandle 
(fd));
 #else
         channel = g_io_channel_unix_new (fd);
 #endif  /* USE_SOCKETS_AS_HANDLES */
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list

Reply via email to