Commit 2cdfc8fb authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠

Use GINT_TO_POINTER and GPOINTER_TO_INT macros instead of direct casts; fixes...

Use GINT_TO_POINTER and GPOINTER_TO_INT macros instead of direct casts; fixes build on AMD64. (fixes #168885)

Original commit message from CVS:
Use GINT_TO_POINTER and GPOINTER_TO_INT macros instead of direct casts; fixes build on AMD64. (fixes #168885)
parent 65c700b9
2005-03-02 James Henstridge <james@jamesh.id.au>
Reviewed by: Tim-Philipp Müller <tim at centricular dot net>
* gst/librfb/rfbdecoder.c: (rfb_socket_get_buffer),
(rfb_socket_send_buffer), (rfb_decoder_use_file_descriptor):
Use GINT_TO_POINTER and GPOINTER_TO_INT macros instead of
direct casts; fixes build on AMD64. (fixes #168885)
2005-03-01 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst-libs/gst/resample/resample.c: (gst_resample_scale):
......
......@@ -21,7 +21,7 @@ static RfbBuffer *
rfb_socket_get_buffer (int length, gpointer user_data)
{
RfbBuffer *buffer;
int fd = (int) user_data;
int fd = GPOINTER_TO_INT (user_data);
int ret;
buffer = rfb_buffer_new ();
......@@ -45,7 +45,7 @@ rfb_socket_get_buffer (int length, gpointer user_data)
static int
rfb_socket_send_buffer (guint8 * buffer, int length, gpointer user_data)
{
int fd = (int) user_data;
int fd = GPOINTER_TO_INT (user_data);
int ret;
g_print ("calling write(%d, %p, %d)\n", fd, buffer, length);
......@@ -79,10 +79,10 @@ rfb_decoder_use_file_descriptor (RfbDecoder * decoder, int fd)
g_return_if_fail (fd >= 0);
decoder->bytestream->get_buffer = rfb_socket_get_buffer;
decoder->bytestream->user_data = (void *) fd;
decoder->bytestream->user_data = GINT_TO_POINTER (fd);
decoder->send_data = rfb_socket_send_buffer;
decoder->buffer_handler_data = (void *) fd;
decoder->buffer_handler_data = GINT_TO_POINTER (fd);
}
void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment