Esempio n. 1
0
void gumbo_error_destroy(GumboError* error) {
  if (error->type == GUMBO_ERR_PARSER ||
      error->type == GUMBO_ERR_UNACKNOWLEDGED_SELF_CLOSING_TAG) {
    gumbo_vector_destroy(&error->v.parser.tag_stack);
  } else if (error->type == GUMBO_ERR_DUPLICATE_ATTR) {
    gumbo_free((void*) error->v.duplicate_attr.name);
  }
  gumbo_free(error);
}
Esempio n. 2
0
void gumbo_vector_destroy(GumboVector* vector) {
  if (vector->capacity > 0) {
    gumbo_free(vector->data);
  }
}
Esempio n. 3
0
void gumbo_string_buffer_destroy(GumboStringBuffer* buffer) {
  gumbo_free(buffer->data);
}