]> andersk Git - libyaml.git/blobdiff - include/yaml.h
fix C++-compat error
[libyaml.git] / include / yaml.h
index 97f655a0216bf2f668e9ea140eb52637bfa3815c..c225908d65425b4ee699f0fa2352637e27114df8 100644 (file)
@@ -1517,6 +1517,18 @@ typedef enum yaml_emitter_state_e {
     YAML_EMIT_END_STATE
 } yaml_emitter_state_t;
 
+
+/* This is needed for C++ */
+
+typedef struct yaml_anchors_s {
+    /** The number of references. */
+    int references;
+    /** The anchor id. */
+    int anchor;
+    /** If the node has been emitted? */
+    int serialized;
+} yaml_anchors_t;
+
 /**
  * The emitter structure.
  *
@@ -1742,14 +1754,7 @@ typedef struct yaml_emitter_s {
     int closed;
 
     /** The information associated with the document nodes. */
-    struct {
-        /** The number of references. */
-        int references;
-        /** The anchor id. */
-        int anchor;
-        /** If the node has been emitted? */
-        int serialized;
-    } *anchors;
+    yaml_anchors_t *anchors;
 
     /** The last assigned anchor id. */
     int last_anchor_id;
This page took 0.026094 seconds and 4 git commands to generate.