blob: 56e4442231626bf8457d5a283b37841de5421e49 [file]
#include "_cgo_export.h"
#include "helpers.h"
#define DEFINE_YUNION_FUNC(name) \
__typeof__(((yaml_event_t *)0)->data.name) * \
event_##name(yaml_event_t *event) { \
return &event->data.name; \
}
DEFINE_YUNION_FUNC(scalar)
DEFINE_YUNION_FUNC(alias)
DEFINE_YUNION_FUNC(mapping_start)
DEFINE_YUNION_FUNC(sequence_start)
void set_output_handler(yaml_emitter_t *e)
{
yaml_emitter_set_output(e, outputHandler, (void *)e);
}