fix C++-compat error

we cannot malloc to an anon struct in C++.
typedef yaml_anchors_t
This commit is contained in:
Reini Urban
2016-05-04 08:53:47 +02:00
committed by Tina Müller
parent 20496ee288
commit 75eddf785f
3 changed files with 15 additions and 10 deletions
+1 -1
View File
@@ -131,7 +131,7 @@ yaml_emitter_dump(yaml_emitter_t *emitter, yaml_document_t *document)
assert(emitter->opened); /* Emitter should be opened. */
emitter->anchors = yaml_malloc(sizeof(*(emitter->anchors))
emitter->anchors = (yaml_anchors_t*)yaml_malloc(sizeof(*(emitter->anchors))
* (document->nodes.top - document->nodes.start));
if (!emitter->anchors) goto error;
memset(emitter->anchors, 0, sizeof(*(emitter->anchors))
+1 -1
View File
@@ -16,7 +16,7 @@
#define PUT(emitter,value) \
(FLUSH(emitter) \
&& (*(emitter->buffer.pointer++) = (yaml_char_t)(value), \
emitter->column ++, \
emitter->column++, \
1))
/*