source: libyaml/trunk/src/api.c @ 178

Revision 178, 421 bytes checked in by xi, 9 years ago (diff)

Doxygenify the header file.

Add basic reader fields to the parser structure.

Start implementing basic parser functions.

Line 
1
2#if HAVE_CONFIG_H
3#include <config.h>
4#endif
5
6#include <yaml/yaml.h>
7
8/*
9 * Create a new parser.
10 */
11
12yaml_parser_t *
13yaml_parser_new(void)
14{
15    yaml_parser_t *parser;
16
17    parser = malloc(sizeof(yaml_parser_t));
18    if (!parser) return NULL;
19
20    memset(parser, 0, sizeof(yaml_parser_t));
21
22    return parser;
23}
24
25/*
26 * Destroy a parser object.
27 */
28
29void
30yaml_parser_delete(yaml_parser_t *parser)
31{
32    free(parser);
33}
34
Note: See TracBrowser for help on using the repository browser.