Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion include/prism.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,13 @@ PRISM_EXPORTED_FUNCTION const char * pm_version(void);
/**
* Initialize a parser with the given start and end pointers.
*
* The resulting parser must eventually be freed with `pm_parser_free()`.
*
* @param parser The parser to initialize.
* @param source The source to parse.
* @param size The size of the source.
* @param options The optional options to use when parsing.
* @param options The optional options to use when parsing. These options must
* live for the whole lifetime of this parser.
*/
PRISM_EXPORTED_FUNCTION void pm_parser_init(pm_parser_t *parser, const uint8_t *source, size_t size, const pm_options_t *options);

Expand All @@ -68,6 +71,9 @@ PRISM_EXPORTED_FUNCTION void pm_parser_register_encoding_changed_callback(pm_par
/**
* Free any memory associated with the given parser.
*
* This does not free the `pm_options_t` object that was used to initialize the
* parser.
*
* @param parser The parser to free.
*/
PRISM_EXPORTED_FUNCTION void pm_parser_free(pm_parser_t *parser);
Expand Down
Loading