Function yaml_parser_set_input

Synopsis

#include <include/yaml.h>

void yaml_parser_set_input(yaml_parser_t *parser, yaml_read_handler_t *handler, void *data)

Description

Set a generic input handler.

Parameters:

[ in,out ] parser - A parser object.

[ in ] handler - A read handler.

[ in ] data - Any application data for passing to the read handler.

Set a generic input.

Mentioned in

Source

Lines 325-335 in src/api.c. Line 1373 in include/yaml.h.

YAML_DECLARE(void)
yaml_parser_set_input(yaml_parser_t *parser,
        yaml_read_handler_t *handler, void *data)
{
    assert(parser); /* Non-NULL parser object expected. */
    assert(!parser->read_handler);  /* You can set the source only once. */
    assert(handler);    /* Non-NULL read handler expected. */

    parser->read_handler = handler;
    parser->read_handler_data = data;
}





Add Discussion as Guest

Log in to DocsForge