summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorReini Urban <rurban@cpanel.net>2016-05-04 08:53:47 +0200
committerTina Müller <cpan2@tinita.de>2018-07-17 23:08:09 +0200
commit75eddf785fedc2aeb9bf96db5a9bee97f7e4e72e (patch)
treed6a230dc193aa40196a7afb815fe2ee9b6b2e4d1 /src
parent20496ee288fc0cbb9416a328f39379f69a5667da (diff)
downloadlibyaml-git-75eddf785fedc2aeb9bf96db5a9bee97f7e4e72e.tar.gz
fix C++-compat error
we cannot malloc to an anon struct in C++. typedef yaml_anchors_t
Diffstat (limited to 'src')
-rw-r--r--src/dumper.c2
-rw-r--r--src/emitter.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/dumper.c b/src/dumper.c
index 29fb9c0..1fe940b 100644
--- a/src/dumper.c
+++ b/src/dumper.c
@@ -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))
diff --git a/src/emitter.c b/src/emitter.c
index 1400df1..9dc27cb 100644
--- a/src/emitter.c
+++ b/src/emitter.c
@@ -16,7 +16,7 @@
#define PUT(emitter,value) \
(FLUSH(emitter) \
&& (*(emitter->buffer.pointer++) = (yaml_char_t)(value), \
- emitter->column ++, \
+ emitter->column++, \
1))
/*