From 26c454c85d3f8aa13008cdefe3cbbe627956c0dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Mon, 22 Mar 2010 16:25:56 +0100 Subject: [PATCH 09/12] Avoid C99 named initializers MSVC doesn't support C99. --- wocky/wocky-sasl-handler.c | 19 ++++++++++--------- wocky/wocky-xmpp-reader.c | 37 ++++++++++++++++++++++++++++++++----- 2 files changed, 42 insertions(+), 14 deletions(-) diff --git a/wocky/wocky-sasl-handler.c b/wocky/wocky-sasl-handler.c index bc4861f..0778aa7 100644 --- a/wocky/wocky-sasl-handler.c +++ b/wocky/wocky-sasl-handler.c @@ -11,15 +11,16 @@ wocky_sasl_handler_get_type (void) { const GTypeInfo info = { - .class_size = sizeof (WockySaslHandlerIface), - .base_init = NULL, - .base_finalize = NULL, - .class_init = NULL, - .class_finalize = NULL, - .class_data = NULL, - .instance_size = 0, - .n_preallocs = 0, - .instance_init = NULL + /* class_size */ sizeof (WockySaslHandlerIface), + /* base_init */ NULL, + /* base_finalize */ NULL, + /* class_init */ NULL, + /* class_finalize */ NULL, + /* class_data */ NULL, + /* instance_size */ 0, + /* n_preallocs */ 0, + /* instance_init */ NULL, + /* value_table */ NULL }; GType g_define_type_id = g_type_register_static ( G_TYPE_INTERFACE, "WockySaslHandler", &info, 0); diff --git a/wocky/wocky-xmpp-reader.c b/wocky/wocky-xmpp-reader.c index 6c52a13..fe4e734 100644 --- a/wocky/wocky-xmpp-reader.c +++ b/wocky/wocky-xmpp-reader.c @@ -69,11 +69,38 @@ static void _characters (void *user_data, const xmlChar *ch, int len); static void _error (void *user_data, xmlErrorPtr error); static xmlSAXHandler parser_handler = { - .initialized = XML_SAX2_MAGIC, - .startElementNs = _start_element_ns, - .endElementNs = _end_element_ns, - .characters = _characters, - .serror = _error, + /* internalSubset */ NULL, + /* isStandalone */ NULL, + /* hasInternalSubset */ NULL, + /* hasExternalSubset */ NULL, + /* resolveEntity */ NULL, + /* getEntity */ NULL, + /* entityDecl */ NULL, + /* notationDecl */ NULL, + /* attributeDecl */ NULL, + /* elementDecl */ NULL, + /* unparsedEntityDecl */ NULL, + /* setDocumentLocator */ NULL, + /* startDocument */ NULL, + /* endDocument */ NULL, + /* startElement */ NULL, + /* endElement */ NULL, + /* reference */ NULL, + /* characters */ _characters, + /* ignorableWhitespace */ NULL, + /* processingInstruction */ NULL, + /* comment */ NULL, + /* warning */ NULL, + /* error */ NULL, + /* fatalError */ NULL, + /* getParameterEntity */ NULL, + /* cdataBlock */ NULL, + /* externalSubset */ NULL, + /* initialized */ XML_SAX2_MAGIC, + /* _private */ NULL, + /* startElementNs */ _start_element_ns, + /* endElementNs */ _end_element_ns, + /* serror */ _error }; /* private structure */ -- 1.6.4.msysgit.0