[libxml2] dict.h: Move xmlDictPtr definition before includes to allow direct inclusion.



commit c71f9305a99b6aa03cb08fab31106c9c56f1be4f
Author: Patrick Monnerat <patrick monnerat dh com>
Date:   Mon May 2 16:21:47 2016 +0200

    dict.h: Move xmlDictPtr definition before includes to allow direct inclusion.

 include/libxml/dict.h      |   18 ++++++++++++------
 os400/libxmlrpg/dict.rpgle |    8 ++++----
 2 files changed, 16 insertions(+), 10 deletions(-)
---
diff --git a/include/libxml/dict.h b/include/libxml/dict.h
index 3028b20..b83db59 100644
--- a/include/libxml/dict.h
+++ b/include/libxml/dict.h
@@ -11,6 +11,18 @@
 #ifndef __XML_DICT_H__
 #define __XML_DICT_H__
 
+#ifdef __cplusplus
+#define __XML_EXTERNC  extern "C"
+#else
+#define __XML_EXTERNC
+#endif
+
+/*
+ * The dictionary.
+ */
+__XML_EXTERNC typedef struct _xmlDict xmlDict;
+__XML_EXTERNC typedef xmlDict *xmlDictPtr;
+
 #include <limits.h>
 #include <libxml/xmlversion.h>
 #include <libxml/tree.h>
@@ -20,12 +32,6 @@ extern "C" {
 #endif
 
 /*
- * The dictionary.
- */
-typedef struct _xmlDict xmlDict;
-typedef xmlDict *xmlDictPtr;
-
-/*
  * Initializer
  */
 XMLPUBFUN int XMLCALL  xmlInitializeDict(void);
diff --git a/os400/libxmlrpg/dict.rpgle b/os400/libxmlrpg/dict.rpgle
index d93c6ef..c061e4c 100644
--- a/os400/libxmlrpg/dict.rpgle
+++ b/os400/libxmlrpg/dict.rpgle
@@ -9,14 +9,14 @@
       /if not defined(XML_DICT_H__)
       /define XML_DICT_H__
 
-      /include "libxmlrpg/xmlversion"
-      /include "libxmlrpg/xmlTypesC"
-      /include "libxmlrpg/tree"
-
       * The dictionary.
 
      d xmlDictPtr      s               *   based(######typedef######)
 
+      /include "libxmlrpg/xmlversion"
+      /include "libxmlrpg/xmlTypesC"
+      /include "libxmlrpg/tree"
+
       * Initializer
 
      d xmlInitializeDict...


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]