src/tokeniser/tokeniser.c
hubbub_error hubbub_tokeniser_destroy(hubbub_tokeniser *tokeniser)
{
	if (tokeniser == NULL)
		return HUBBUB_BADPARM;

	if (tokeniser->context.current_tag.attributes != NULL) {
		tokeniser->alloc(tokeniser->context.current_tag.attributes,
				0, tokeniser->alloc_pw);
	}

	parserutils_buffer_destroy(tokeniser->insert_buf);

	parserutils_buffer_destroy(tokeniser->buffer);

	tokeniser->alloc(tokeniser, 0, tokeniser->alloc_pw);

	return HUBBUB_OK;
}
/**
 * Destroy a hubbub tokeniser
 *
 * \param tokeniser  The tokeniser instance to destroy
 * \return HUBBUB_OK on success, appropriate error otherwise
 */
Destroy a hubbub tokeniser
\param tokeniser  The tokeniser instance to destroy
\return HUBBUB_OK on success, appropriate error otherwise
Destroy a hubbub tokeniser \ param tokeniser The tokeniser instance to destroy \ return HUBBUB_OK on success appropriate error otherwise
hubbub_error hubbub_tokeniser_destroy(hubbub_tokeniser *tokeniser)
{
	if (tokeniser == NULL)
		return HUBBUB_BADPARM;
	if (tokeniser->context.current_tag.attributes != NULL) {
		tokeniser->alloc(tokeniser->context.current_tag.attributes,
				0, tokeniser->alloc_pw);
	}
	parserutils_buffer_destroy(tokeniser->insert_buf);
	parserutils_buffer_destroy(tokeniser->buffer);
	tokeniser->alloc(tokeniser, 0, tokeniser->alloc_pw);
	return HUBBUB_OK;
}
hubbub_error hubbub_tokeniser_destroy ( hubbub_tokeniser * tokeniser ) { if ( tokeniser == NULL ) return HUBBUB_BADPARM ; if ( tokeniser -> context . current_tag . attributes != NULL ) { tokeniser -> alloc ( tokeniser -> context . current_tag . attributes , 0 , tokeniser -> alloc_pw ) ; } parserutils_buffer_destroy ( tokeniser -> insert_buf ) ; parserutils_buffer_destroy ( tokeniser -> buffer ) ; tokeniser -> alloc ( tokeniser , 0 , tokeniser -> alloc_pw ) ; return HUBBUB_OK ; }
Destroy a hubbub tokeniser
 \param tokeniser  The tokeniser instance to destroy
 \return HUBBUB_OK on success, appropriate error otherwise
Destroy a hubbub tokeniser \ param tokeniser The tokeniser instance to destroy \ return HUBBUB_OK on success appropriate error otherwise