[libsoup] Prefix signal ID enum entries with SIGNAL_ to avoid using EOF
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup] Prefix signal ID enum entries with SIGNAL_ to avoid using EOF
- Date: Tue, 12 Jul 2016 15:45:22 +0000 (UTC)
commit 72c5759b4cd1e2e9e619ed1ca0c4d5e43d0b444b
Author: Philip Withnall <philip withnall collabora co uk>
Date: Tue Jul 12 14:12:29 2016 +0100
Prefix signal ID enum entries with SIGNAL_ to avoid using EOF
glibc defines EOF as a macro, so we cannot use that as the name for a
signal ID enum entry, otherwise it will be preprocessed to some number
if we end up with the wrong header included, and compilation will fail.
Instead, prefix signal ID enum entries with ‘SIGNAL_’ in
SoupCacheClientInputStream and SoupClientInputStream.
https://bugzilla.gnome.org/show_bug.cgi?id=768731
libsoup/soup-cache-client-input-stream.c | 12 ++++++------
libsoup/soup-client-input-stream.c | 8 ++++----
2 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/libsoup/soup-cache-client-input-stream.c b/libsoup/soup-cache-client-input-stream.c
index cea39a3..11bb260 100644
--- a/libsoup/soup-cache-client-input-stream.c
+++ b/libsoup/soup-cache-client-input-stream.c
@@ -14,8 +14,8 @@
#include "soup-message-private.h"
enum {
- EOF,
- CLOSED,
+ SIGNAL_EOF,
+ SIGNAL_CLOSED,
LAST_SIGNAL
};
@@ -41,7 +41,7 @@ soup_cache_client_input_stream_read_fn (GInputStream *stream,
read_fn (stream, buffer, count, cancellable, error);
if (nread == 0)
- g_signal_emit (stream, signals[EOF], 0);
+ g_signal_emit (stream, signals[SIGNAL_EOF], 0);
return nread;
}
@@ -57,7 +57,7 @@ soup_cache_client_input_stream_close_fn (GInputStream *stream,
success = G_INPUT_STREAM_CLASS (soup_cache_client_input_stream_parent_class)->
close_fn (stream, cancellable, error);
- g_signal_emit (stream, signals[CLOSED], 0);
+ g_signal_emit (stream, signals[SIGNAL_CLOSED], 0);
return success;
}
@@ -71,7 +71,7 @@ soup_cache_client_input_stream_class_init (SoupCacheClientInputStreamClass *stre
input_stream_class->read_fn = soup_cache_client_input_stream_read_fn;
input_stream_class->close_fn = soup_cache_client_input_stream_close_fn;
- signals[EOF] =
+ signals[SIGNAL_EOF] =
g_signal_new ("eof",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -79,7 +79,7 @@ soup_cache_client_input_stream_class_init (SoupCacheClientInputStreamClass *stre
NULL, NULL,
NULL,
G_TYPE_NONE, 0);
- signals[CLOSED] =
+ signals[SIGNAL_CLOSED] =
g_signal_new ("closed",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
diff --git a/libsoup/soup-client-input-stream.c b/libsoup/soup-client-input-stream.c
index 0264cb7..1798306 100644
--- a/libsoup/soup-client-input-stream.c
+++ b/libsoup/soup-client-input-stream.c
@@ -18,7 +18,7 @@ struct _SoupClientInputStreamPrivate {
};
enum {
- EOF,
+ SIGNAL_EOF,
LAST_SIGNAL
};
@@ -100,7 +100,7 @@ soup_client_input_stream_read_fn (GInputStream *stream,
read_fn (stream, buffer, count, cancellable, error);
if (nread == 0)
- g_signal_emit (stream, signals[EOF], 0);
+ g_signal_emit (stream, signals[SIGNAL_EOF], 0);
return nread;
}
@@ -117,7 +117,7 @@ soup_client_input_stream_read_nonblocking (GPollableInputStream *stream,
read_nonblocking (stream, buffer, count, error);
if (nread == 0)
- g_signal_emit (stream, signals[EOF], 0);
+ g_signal_emit (stream, signals[SIGNAL_EOF], 0);
return nread;
}
@@ -226,7 +226,7 @@ soup_client_input_stream_class_init (SoupClientInputStreamClass *stream_class)
input_stream_class->close_async = soup_client_input_stream_close_async;
input_stream_class->close_finish = soup_client_input_stream_close_finish;
- signals[EOF] =
+ signals[SIGNAL_EOF] =
g_signal_new ("eof",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]