summaryrefslogtreecommitdiff
path: root/src/api.c
diff options
context:
space:
mode:
authorKirill Simonov <xi@resolvent.net>2006-05-26 21:46:47 +0000
committerKirill Simonov <xi@resolvent.net>2006-05-26 21:46:47 +0000
commita51447c932b63bcf7cc0226dafd621c6cd8a347a (patch)
tree42b2460010356ec92b15341e37e4c0437d34a9e8 /src/api.c
parent721c1923e49cc10cec9821d0877d94237265ca6f (diff)
downloadlibyaml-git-a51447c932b63bcf7cc0226dafd621c6cd8a347a.tar.gz
Doxygenify the header file.
Add basic reader fields to the parser structure. Start implementing basic parser functions.
Diffstat (limited to 'src/api.c')
-rw-r--r--src/api.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/api.c b/src/api.c
new file mode 100644
index 0000000..cffa8e9
--- /dev/null
+++ b/src/api.c
@@ -0,0 +1,34 @@
+
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <yaml/yaml.h>
+
+/*
+ * Create a new parser.
+ */
+
+yaml_parser_t *
+yaml_parser_new(void)
+{
+ yaml_parser_t *parser;
+
+ parser = malloc(sizeof(yaml_parser_t));
+ if (!parser) return NULL;
+
+ memset(parser, 0, sizeof(yaml_parser_t));
+
+ return parser;
+}
+
+/*
+ * Destroy a parser object.
+ */
+
+void
+yaml_parser_delete(yaml_parser_t *parser)
+{
+ free(parser);
+}
+