You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by ro...@apache.org on 2013/03/22 17:13:52 UTC

git commit: THRIFT-1879 Add support for GObject-Introspection Patch: Evan Nemerson patch 1: 0001-Move-typedefs-before-public-structs-to-work-around-g.patch

Updated Branches:
  refs/heads/master 9b2524415 -> a51186b7f


THRIFT-1879 Add support for GObject-Introspection
Patch: Evan Nemerson
patch 1: 0001-Move-typedefs-before-public-structs-to-work-around-g.patch


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/a51186b7
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/a51186b7
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/a51186b7

Branch: refs/heads/master
Commit: a51186b7f2bd388d95485404017f05eb3b861074
Parents: 9b25244
Author: Roger Meier <ro...@apache.org>
Authored: Fri Mar 22 17:12:03 2013 +0100
Committer: Roger Meier <ro...@apache.org>
Committed: Fri Mar 22 17:12:03 2013 +0100

----------------------------------------------------------------------
 .../c_glib/protocol/thrift_binary_protocol.h       |    6 ++++--
 .../protocol/thrift_binary_protocol_factory.h      |    6 ++++--
 .../src/thrift/c_glib/protocol/thrift_protocol.h   |    6 ++++--
 .../c_glib/protocol/thrift_protocol_factory.h      |    6 ++++--
 .../src/thrift/c_glib/server/thrift_server.h       |    6 ++++--
 .../thrift/c_glib/server/thrift_simple_server.h    |    6 ++++--
 .../thrift/c_glib/thrift_application_exception.h   |    6 ++++--
 lib/c_glib/src/thrift/c_glib/thrift_struct.h       |    6 ++++--
 .../c_glib/transport/thrift_buffered_transport.h   |    6 ++++--
 .../c_glib/transport/thrift_framed_transport.h     |    6 ++++--
 .../thrift/c_glib/transport/thrift_memory_buffer.h |    6 ++++--
 .../thrift/c_glib/transport/thrift_server_socket.h |    6 ++++--
 .../c_glib/transport/thrift_server_transport.h     |    6 ++++--
 .../src/thrift/c_glib/transport/thrift_socket.h    |    6 ++++--
 .../src/thrift/c_glib/transport/thrift_transport.h |    6 ++++--
 .../c_glib/transport/thrift_transport_factory.h    |    6 ++++--
 16 files changed, 64 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/a51186b7/lib/c_glib/src/thrift/c_glib/protocol/thrift_binary_protocol.h
----------------------------------------------------------------------
diff --git a/lib/c_glib/src/thrift/c_glib/protocol/thrift_binary_protocol.h b/lib/c_glib/src/thrift/c_glib/protocol/thrift_binary_protocol.h
index b9e6b19..5230bcc 100644
--- a/lib/c_glib/src/thrift/c_glib/protocol/thrift_binary_protocol.h
+++ b/lib/c_glib/src/thrift/c_glib/protocol/thrift_binary_protocol.h
@@ -44,6 +44,8 @@ G_BEGIN_DECLS
 #define THRIFT_BINARY_PROTOCOL_VERSION_1 0x80010000
 #define THRIFT_BINARY_PROTOCOL_VERSION_MASK 0xffff0000
 
+typedef struct _ThriftBinaryProtocol ThriftBinaryProtocol;
+
 /*!
  * Thrift Binary Protocol instance.
  */
@@ -51,7 +53,8 @@ struct _ThriftBinaryProtocol
 {
   ThriftProtocol parent;
 };
-typedef struct _ThriftBinaryProtocol ThriftBinaryProtocol;
+
+typedef struct _ThriftBinaryProtocolClass ThriftBinaryProtocolClass;
 
 /*!
  * Thrift Binary Protocol class.
@@ -60,7 +63,6 @@ struct _ThriftBinaryProtocolClass
 {
   ThriftProtocolClass parent;
 };
-typedef struct _ThriftBinaryProtocolClass ThriftBinaryProtocolClass;
 
 /* used by THRIFT_TYPE_BINARY_PROTOCOL */
 GType thrift_binary_protocol_get_type (void);

http://git-wip-us.apache.org/repos/asf/thrift/blob/a51186b7/lib/c_glib/src/thrift/c_glib/protocol/thrift_binary_protocol_factory.h
----------------------------------------------------------------------
diff --git a/lib/c_glib/src/thrift/c_glib/protocol/thrift_binary_protocol_factory.h b/lib/c_glib/src/thrift/c_glib/protocol/thrift_binary_protocol_factory.h
index a4256b2..eddc073 100644
--- a/lib/c_glib/src/thrift/c_glib/protocol/thrift_binary_protocol_factory.h
+++ b/lib/c_glib/src/thrift/c_glib/protocol/thrift_binary_protocol_factory.h
@@ -34,17 +34,19 @@ G_BEGIN_DECLS
 #define THRIFT_IS_BINARY_PROTOCOL_FACTORY_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), THRIFT_TYPE_BINARY_PROTOCOL_FACTORY))
 #define THRIFT_BINARY_PROTOCOL_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THRIFT_TYPE_BINARY_PROTOCOL_FACTORY, ThriftBinaryProtocolFactoryClass))
 
+typedef struct _ThriftBinaryProtocolFactory ThriftBinaryProtocolFactory;
+
 struct _ThriftBinaryProtocolFactory
 {
   ThriftProtocolFactory parent;
 };
-typedef struct _ThriftBinaryProtocolFactory ThriftBinaryProtocolFactory;
+
+typedef struct _ThriftBinaryProtocolFactoryClass ThriftBinaryProtocolFactoryClass;
 
 struct _ThriftBinaryProtocolFactoryClass
 {
   ThriftProtocolFactoryClass parent;
 };
-typedef struct _ThriftBinaryProtocolFactoryClass ThriftBinaryProtocolFactoryClass;
 
 /* used by THRIFT_TYPE_BINARY_PROTOCOL_FACTORY */
 GType thrift_binary_protocol_factory_get_type (void);

http://git-wip-us.apache.org/repos/asf/thrift/blob/a51186b7/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol.h
----------------------------------------------------------------------
diff --git a/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol.h b/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol.h
index b47498b..df28a4a 100644
--- a/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol.h
+++ b/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol.h
@@ -75,6 +75,8 @@ typedef enum {
 #define THRIFT_IS_PROTOCOL_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), THRIFT_TYPE_PROTOCOL))
 #define THRIFT_PROTOCOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THRIFT_TYPE_PROTOCOL, ThriftProtocolClass))
 
+typedef struct _ThriftProtocol ThriftProtocol;
+
 /*!
  * Thrift Protocol object
  */
@@ -85,7 +87,8 @@ struct _ThriftProtocol
   /* protected */
   ThriftTransport *transport;
 };
-typedef struct _ThriftProtocol ThriftProtocol;
+
+typedef struct _ThriftProtocolClass ThriftProtocolClass;
 
 /*!
  * Thrift Protocol class
@@ -169,7 +172,6 @@ struct _ThriftProtocolClass
   gint32 (*read_binary) (ThriftProtocol *protocol, gpointer *buf,
                          guint32 *len, GError **error);
 };
-typedef struct _ThriftProtocolClass ThriftProtocolClass;
 
 /* used by THRIFT_TYPE_PROTOCOL */
 GType thrift_protocol_get_type (void);

http://git-wip-us.apache.org/repos/asf/thrift/blob/a51186b7/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol_factory.h
----------------------------------------------------------------------
diff --git a/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol_factory.h b/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol_factory.h
index a9cd5f5..5f146dd 100644
--- a/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol_factory.h
+++ b/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol_factory.h
@@ -39,6 +39,8 @@ G_BEGIN_DECLS
 #define THRIFT_IS_PROTOCOL_FACTORY_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), THRIFT_TYPE_PROTOCOL_FACTORY))
 #define THRIFT_PROTOCOL_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THRIFT_TYPE_PROTOCOL_FACTORY, ThriftProtocolFactoryClass))
 
+typedef struct _ThriftProtocolFactory ThriftProtocolFactory;
+
 /*!
  * Thrift Protocol Factory object
  */
@@ -46,7 +48,8 @@ struct _ThriftProtocolFactory
 {
   GObject parent;
 };
-typedef struct _ThriftProtocolFactory ThriftProtocolFactory;
+
+typedef struct _ThriftProtocolFactoryClass ThriftProtocolFactoryClass;
 
 /*!
  * Thrift Protocol Factory class
@@ -58,7 +61,6 @@ struct _ThriftProtocolFactoryClass
   ThriftProtocol *(*get_protocol) (ThriftProtocolFactory *factory,
                                    ThriftTransport *transport);
 };
-typedef struct _ThriftProtocolFactoryClass ThriftProtocolFactoryClass;
 
 /* used by THRIFT_TYPE_PROTOCOL_FACTORY */
 GType thrift_protocol_factory_get_type (void);

http://git-wip-us.apache.org/repos/asf/thrift/blob/a51186b7/lib/c_glib/src/thrift/c_glib/server/thrift_server.h
----------------------------------------------------------------------
diff --git a/lib/c_glib/src/thrift/c_glib/server/thrift_server.h b/lib/c_glib/src/thrift/c_glib/server/thrift_server.h
index a3aa94e..2744f97 100644
--- a/lib/c_glib/src/thrift/c_glib/server/thrift_server.h
+++ b/lib/c_glib/src/thrift/c_glib/server/thrift_server.h
@@ -41,6 +41,8 @@ G_BEGIN_DECLS
 #define THRIFT_IS_SERVER_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), THRIFT_TYPE_SERVER))
 #define THRIFT_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THRIFT_TYPE_SERVER, ThriftServerClass))
 
+typedef struct _ThriftServer ThriftServer;
+
 /*!
  * Thrift Server object
  */
@@ -56,7 +58,8 @@ struct _ThriftServer
   ThriftProtocolFactory *input_protocol_factory;
   ThriftProtocolFactory *output_protocol_factory;
 };
-typedef struct _ThriftServer ThriftServer;
+
+typedef struct _ThriftServerClass ThriftServerClass;
 
 /*!
  * Thrift Server class
@@ -69,7 +72,6 @@ struct _ThriftServerClass
   void (*serve) (ThriftServer *server);
   void (*stop) (ThriftServer *server);
 };
-typedef struct _ThriftServerClass ThriftServerClass;
 
 /* used by THRIFT_TYPE_SERVER */
 GType thrift_server_get_type (void);

http://git-wip-us.apache.org/repos/asf/thrift/blob/a51186b7/lib/c_glib/src/thrift/c_glib/server/thrift_simple_server.h
----------------------------------------------------------------------
diff --git a/lib/c_glib/src/thrift/c_glib/server/thrift_simple_server.h b/lib/c_glib/src/thrift/c_glib/server/thrift_simple_server.h
index d45dc21..86b538b 100644
--- a/lib/c_glib/src/thrift/c_glib/server/thrift_simple_server.h
+++ b/lib/c_glib/src/thrift/c_glib/server/thrift_simple_server.h
@@ -38,6 +38,8 @@ G_BEGIN_DECLS
 #define THRIFT_IS_SIMPLE_SERVER_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), THRIFT_TYPE_SIMPLE_SERVER))
 #define THRIFT_SIMPLE_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THRIFT_TYPE_SIMPLE_SERVER, ThriftSimpleServerClass))
 
+typedef struct _ThriftSimpleServer ThriftSimpleServer;
+
 /**
  * Thrift Simple Server instance.
  */
@@ -48,7 +50,8 @@ struct _ThriftSimpleServer
   /* private */
   volatile gboolean running;
 };
-typedef struct _ThriftSimpleServer ThriftSimpleServer;
+
+typedef struct _ThriftSimpleServerClass ThriftSimpleServerClass;
 
 /**
  * Thrift Simple Server class.
@@ -57,7 +60,6 @@ struct _ThriftSimpleServerClass
 {
   ThriftServerClass parent;
 };
-typedef struct _ThriftSimpleServerClass ThriftSimpleServerClass;
 
 /* used by THRIFT_TYPE_SIMPLE_SERVER */
 GType thrift_simple_server_get_type (void);

http://git-wip-us.apache.org/repos/asf/thrift/blob/a51186b7/lib/c_glib/src/thrift/c_glib/thrift_application_exception.h
----------------------------------------------------------------------
diff --git a/lib/c_glib/src/thrift/c_glib/thrift_application_exception.h b/lib/c_glib/src/thrift/c_glib/thrift_application_exception.h
index 580f4fc..ba3e97b 100644
--- a/lib/c_glib/src/thrift/c_glib/thrift_application_exception.h
+++ b/lib/c_glib/src/thrift/c_glib/thrift_application_exception.h
@@ -37,6 +37,8 @@ G_BEGIN_DECLS
 #define THRIFT_IS_APPLICATION_EXCEPTION_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), THRIFT_TYPE_APPLICATION_EXCEPTION))
 #define THRIFT_APPLICATION_EXCEPTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THRIFT_TYPE_APPLICATION_EXCEPTION, ThriftApplicationExceptionClass))
 
+typedef struct _ThriftApplicationException ThriftApplicationException;
+
 struct _ThriftApplicationException
 {
   ThriftStruct parent;
@@ -47,13 +49,13 @@ struct _ThriftApplicationException
   gchar *message;
   gboolean __isset_message;
 };
-typedef struct _ThriftApplicationException ThriftApplicationException;
+
+typedef struct _ThriftApplicationExceptionClass ThriftApplicationExceptionClass;
 
 struct _ThriftApplicationExceptionClass
 {
   ThriftStructClass parent;
 };
-typedef struct _ThriftApplicationExceptionClass ThriftApplicationExceptionClass;
 
 GType thrift_application_exception_get_type (void);
 

http://git-wip-us.apache.org/repos/asf/thrift/blob/a51186b7/lib/c_glib/src/thrift/c_glib/thrift_struct.h
----------------------------------------------------------------------
diff --git a/lib/c_glib/src/thrift/c_glib/thrift_struct.h b/lib/c_glib/src/thrift/c_glib/thrift_struct.h
index 656cb54..f4cfcb2 100644
--- a/lib/c_glib/src/thrift/c_glib/thrift_struct.h
+++ b/lib/c_glib/src/thrift/c_glib/thrift_struct.h
@@ -33,6 +33,8 @@ G_BEGIN_DECLS
 #define THRIFT_IS_STRUCT_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), THRIFT_TYPE_STRUCT))
 #define THRIFT_STRUCT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THRIFT_TYPE_STRUCT, ThriftStructClass))
 
+typedef struct _ThriftStruct ThriftStruct;
+
 /* struct */
 struct _ThriftStruct
 {
@@ -40,7 +42,8 @@ struct _ThriftStruct
 
   /* private */
 };
-typedef struct _ThriftStruct ThriftStruct;
+
+typedef struct _ThriftStructClass ThriftStructClass;
 
 struct _ThriftStructClass
 {
@@ -52,7 +55,6 @@ struct _ThriftStructClass
   gint32 (*write) (ThriftStruct *object, ThriftProtocol *protocol,
                    GError **error);
 };
-typedef struct _ThriftStructClass ThriftStructClass;
 
 GType thrift_struct_get_type (void);
 

http://git-wip-us.apache.org/repos/asf/thrift/blob/a51186b7/lib/c_glib/src/thrift/c_glib/transport/thrift_buffered_transport.h
----------------------------------------------------------------------
diff --git a/lib/c_glib/src/thrift/c_glib/transport/thrift_buffered_transport.h b/lib/c_glib/src/thrift/c_glib/transport/thrift_buffered_transport.h
index 6abe10e..837f467 100644
--- a/lib/c_glib/src/thrift/c_glib/transport/thrift_buffered_transport.h
+++ b/lib/c_glib/src/thrift/c_glib/transport/thrift_buffered_transport.h
@@ -40,6 +40,8 @@ G_BEGIN_DECLS
 #define THRIFT_IS_BUFFERED_TRANSPORT_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), THRIFT_TYPE_BUFFERED_TRANSPORT)
 #define THRIFT_BUFFERED_TRANSPORT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THRIFT_TYPE_BUFFERED_TRANSPORT, ThriftBufferedTransportClass))
 
+typedef struct _ThriftBufferedTransport ThriftBufferedTransport;
+
 /*!
  * ThriftBufferedTransport  instance.
  */
@@ -56,7 +58,8 @@ struct _ThriftBufferedTransport
   guint32 r_buf_size;
   guint32 w_buf_size;
 };
-typedef struct _ThriftBufferedTransport ThriftBufferedTransport;
+
+typedef struct _ThriftBufferedTransportClass ThriftBufferedTransportClass;
 
 /*!
  * ThriftBufferedTransport class.
@@ -65,7 +68,6 @@ struct _ThriftBufferedTransportClass
 {
   ThriftTransportClass parent;
 };
-typedef struct _ThriftBufferedTransportClass ThriftBufferedTransportClass;
 
 /* used by THRIFT_TYPE_BUFFERED_TRANSPORT */
 GType thrift_buffered_transport_get_type (void);

http://git-wip-us.apache.org/repos/asf/thrift/blob/a51186b7/lib/c_glib/src/thrift/c_glib/transport/thrift_framed_transport.h
----------------------------------------------------------------------
diff --git a/lib/c_glib/src/thrift/c_glib/transport/thrift_framed_transport.h b/lib/c_glib/src/thrift/c_glib/transport/thrift_framed_transport.h
index 055f4f0..95c0123 100644
--- a/lib/c_glib/src/thrift/c_glib/transport/thrift_framed_transport.h
+++ b/lib/c_glib/src/thrift/c_glib/transport/thrift_framed_transport.h
@@ -40,6 +40,8 @@ G_BEGIN_DECLS
 #define THRIFT_IS_FRAMED_TRANSPORT_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), THRIFT_TYPE_FRAMED_TRANSPORT)
 #define THRIFT_FRAMED_TRANSPORT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THRIFT_TYPE_FRAMED_TRANSPORT, ThriftFramedTransportClass))
 
+typedef struct _ThriftFramedTransport ThriftFramedTransport;
+
 /*!
  * ThriftFramedTransport instance.
  */
@@ -56,7 +58,8 @@ struct _ThriftFramedTransport
   guint32 r_buf_size;
   guint32 w_buf_size;
 };
-typedef struct _ThriftFramedTransport ThriftFramedTransport;
+
+typedef struct _ThriftFramedTransportClass ThriftFramedTransportClass;
 
 /*!
  * ThriftFramedTransport class.
@@ -65,7 +68,6 @@ struct _ThriftFramedTransportClass
 {
   ThriftTransportClass parent;
 };
-typedef struct _ThriftFramedTransportClass ThriftFramedTransportClass;
 
 /* used by THRIFT_TYPE_FRAMED_TRANSPORT */
 GType thrift_framed_transport_get_type (void);

http://git-wip-us.apache.org/repos/asf/thrift/blob/a51186b7/lib/c_glib/src/thrift/c_glib/transport/thrift_memory_buffer.h
----------------------------------------------------------------------
diff --git a/lib/c_glib/src/thrift/c_glib/transport/thrift_memory_buffer.h b/lib/c_glib/src/thrift/c_glib/transport/thrift_memory_buffer.h
index 7214d30..4ebe98f 100644
--- a/lib/c_glib/src/thrift/c_glib/transport/thrift_memory_buffer.h
+++ b/lib/c_glib/src/thrift/c_glib/transport/thrift_memory_buffer.h
@@ -39,6 +39,8 @@ G_BEGIN_DECLS
 #define THRIFT_IS_MEMORY_BUFFER_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), THRIFT_TYPE_MEMORY_BUFFER)
 #define THRIFT_MEMORY_BUFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THRIFT_TYPE_MEMORY_BUFFER, ThriftMemoryBufferClass))
 
+typedef struct _ThriftMemoryBuffer ThriftMemoryBuffer;
+
 /*!
  * ThriftMemoryBuffer instance.
  */
@@ -50,7 +52,8 @@ struct _ThriftMemoryBuffer
   GByteArray *buf;
   guint32 buf_size;
 };
-typedef struct _ThriftMemoryBuffer ThriftMemoryBuffer;
+
+typedef struct _ThriftMemoryBufferClass ThriftMemoryBufferClass;
 
 /*!
  * ThriftMemoryBuffer class.
@@ -59,7 +62,6 @@ struct _ThriftMemoryBufferClass
 {
   ThriftTransportClass parent;
 };
-typedef struct _ThriftMemoryBufferClass ThriftMemoryBufferClass;
 
 /* used by THRIFT_TYPE_MEMORY_BUFFER */
 GType thrift_memory_buffer_get_type (void);

http://git-wip-us.apache.org/repos/asf/thrift/blob/a51186b7/lib/c_glib/src/thrift/c_glib/transport/thrift_server_socket.h
----------------------------------------------------------------------
diff --git a/lib/c_glib/src/thrift/c_glib/transport/thrift_server_socket.h b/lib/c_glib/src/thrift/c_glib/transport/thrift_server_socket.h
index 54a6017..f072cb0 100644
--- a/lib/c_glib/src/thrift/c_glib/transport/thrift_server_socket.h
+++ b/lib/c_glib/src/thrift/c_glib/transport/thrift_server_socket.h
@@ -39,6 +39,8 @@ G_BEGIN_DECLS
 #define THRIFT_IS_SERVER_SOCKET_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), THRIFT_TYPE_SERVER_SOCKET))
 #define THRIFT_SERVER_SOCKET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THRIFT_TYPE_SERVER_SOCKET, ThriftServerSocketClass))
 
+typedef struct _ThriftServerSocket ThriftServerSocket;
+
 /*!
  * Thrift ServerSocket instance.
  */
@@ -54,7 +56,8 @@ struct _ThriftServerSocket
   guint32 buf_size;
   guint32 buf_len;
 };
-typedef struct _ThriftServerSocket ThriftServerSocket;
+
+typedef struct _ThriftServerSocketClass ThriftServerSocketClass;
 
 /*!
  * Thrift ServerSocket class.
@@ -63,7 +66,6 @@ struct _ThriftServerSocketClass
 {
   ThriftServerTransportClass parent;
 };
-typedef struct _ThriftServerSocketClass ThriftServerSocketClass;
 
 /* used by THRIFT_TYPE_SERVER_SOCKET */
 GType thrift_server_socket_get_type (void);

http://git-wip-us.apache.org/repos/asf/thrift/blob/a51186b7/lib/c_glib/src/thrift/c_glib/transport/thrift_server_transport.h
----------------------------------------------------------------------
diff --git a/lib/c_glib/src/thrift/c_glib/transport/thrift_server_transport.h b/lib/c_glib/src/thrift/c_glib/transport/thrift_server_transport.h
index dd94325..98a9191 100644
--- a/lib/c_glib/src/thrift/c_glib/transport/thrift_server_transport.h
+++ b/lib/c_glib/src/thrift/c_glib/transport/thrift_server_transport.h
@@ -38,11 +38,14 @@ G_BEGIN_DECLS
 #define THRIFT_IS_SERVER_TRANSPORT_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), THRIFT_TYPE_SERVER_TRANSPORT))
 #define THRIFT_SERVER_TRANSPORT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THRIFT_TYPE_SERVER_TRANSPORT, ThriftServerTransportClass))
 
+typedef struct _ThriftServerTransport ThriftServerTransport;
+
 struct _ThriftServerTransport
 {
   GObject parent;
 };
-typedef struct _ThriftServerTransport ThriftServerTransport;
+
+typedef struct _ThriftServerTransportClass ThriftServerTransportClass;
 
 /*!
  * Thrift Transport class
@@ -56,7 +59,6 @@ struct _ThriftServerTransportClass
   ThriftTransport *(*accept) (ThriftServerTransport *transport, GError **error);
   gboolean (*close) (ThriftServerTransport *transport, GError **error);
 };
-typedef struct _ThriftServerTransportClass ThriftServerTransportClass;
 
 /* used by THRIFT_TYPE_SERVER_TRANSPORT */
 GType thrift_server_transport_get_type (void);

http://git-wip-us.apache.org/repos/asf/thrift/blob/a51186b7/lib/c_glib/src/thrift/c_glib/transport/thrift_socket.h
----------------------------------------------------------------------
diff --git a/lib/c_glib/src/thrift/c_glib/transport/thrift_socket.h b/lib/c_glib/src/thrift/c_glib/transport/thrift_socket.h
index a130370..981577d 100644
--- a/lib/c_glib/src/thrift/c_glib/transport/thrift_socket.h
+++ b/lib/c_glib/src/thrift/c_glib/transport/thrift_socket.h
@@ -39,6 +39,8 @@ G_BEGIN_DECLS
 #define THRIFT_IS_SOCKET_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), THRIFT_TYPE_SOCKET))
 #define THRIFT_SOCKET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THRIFT_TYPE_SOCKET, ThriftSocketClass))
 
+typedef struct _ThriftSocket ThriftSocket;
+
 /*!
  * Thrift Socket instance.
  */
@@ -54,7 +56,8 @@ struct _ThriftSocket
   guint32 buf_size;
   guint32 buf_len;
 };
-typedef struct _ThriftSocket ThriftSocket;
+
+typedef struct _ThriftSocketClass ThriftSocketClass;
 
 /*!
  * Thrift Socket class.
@@ -63,7 +66,6 @@ struct _ThriftSocketClass
 {
   ThriftTransportClass parent;
 };
-typedef struct _ThriftSocketClass ThriftSocketClass;
 
 /* used by THRIFT_TYPE_SOCKET */
 GType thrift_socket_get_type (void);

http://git-wip-us.apache.org/repos/asf/thrift/blob/a51186b7/lib/c_glib/src/thrift/c_glib/transport/thrift_transport.h
----------------------------------------------------------------------
diff --git a/lib/c_glib/src/thrift/c_glib/transport/thrift_transport.h b/lib/c_glib/src/thrift/c_glib/transport/thrift_transport.h
index 9797473..20f6cd4 100644
--- a/lib/c_glib/src/thrift/c_glib/transport/thrift_transport.h
+++ b/lib/c_glib/src/thrift/c_glib/transport/thrift_transport.h
@@ -42,6 +42,8 @@ G_BEGIN_DECLS
 #define THRIFT_IS_TRANSPORT_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), THRIFT_TYPE_TRANSPORT))
 #define THRIFT_TRANSPORT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THRIFT_TYPE_TRANSPORT, ThriftTransportClass))
 
+typedef struct _ThriftTransport ThriftTransport;
+
 /*!
  * Thrift Protocol object
  */
@@ -49,7 +51,8 @@ struct _ThriftTransport
 {
   GObject parent;
 };
-typedef struct _ThriftTransport ThriftTransport;
+
+typedef struct _ThriftTransportClass ThriftTransportClass;
 
 /*!
  * Thrift Transport class
@@ -70,7 +73,6 @@ struct _ThriftTransportClass
   gboolean (*write_end) (ThriftTransport *transport, GError **error);
   gboolean (*flush) (ThriftTransport *transport, GError **error);
 };
-typedef struct _ThriftTransportClass ThriftTransportClass;
 
 /* used by THRIFT_TYPE_TRANSPORT */
 GType thrift_transport_get_type (void);

http://git-wip-us.apache.org/repos/asf/thrift/blob/a51186b7/lib/c_glib/src/thrift/c_glib/transport/thrift_transport_factory.h
----------------------------------------------------------------------
diff --git a/lib/c_glib/src/thrift/c_glib/transport/thrift_transport_factory.h b/lib/c_glib/src/thrift/c_glib/transport/thrift_transport_factory.h
index e44198b..0e3da30 100644
--- a/lib/c_glib/src/thrift/c_glib/transport/thrift_transport_factory.h
+++ b/lib/c_glib/src/thrift/c_glib/transport/thrift_transport_factory.h
@@ -40,12 +40,15 @@ G_BEGIN_DECLS
 #define THRIFT_IS_TRANSPORT_FACTORY_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), THRIFT_TYPE_TRANSPORT_FACTORY))
 #define THRIFT_TRANSPORT_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THRIFT_TYPE_TRANSPORT_FACTORY, ThriftTransportFactoryClass))
 
+typedef struct _ThriftTransportFactory ThriftTransportFactory;
+
 /* Thrift Transport Factory instance */
 struct _ThriftTransportFactory
 {
   GObject parent;
 };
-typedef struct _ThriftTransportFactory ThriftTransportFactory;
+
+typedef struct _ThriftTransportFactoryClass ThriftTransportFactoryClass;
 
 /* Thrift Transport Factory class */
 struct _ThriftTransportFactoryClass
@@ -56,7 +59,6 @@ struct _ThriftTransportFactoryClass
   ThriftTransport *(*get_transport) (ThriftTransportFactory *factory,
                                      ThriftTransport *transport);
 };
-typedef struct _ThriftTransportFactoryClass ThriftTransportFactoryClass;
 
 /* used by THRIFT_TYPE_TRANSPORT_FACTORY */
 GType thrift_transport_factory_get_type (void);