Gumbo  1.0
A C library for parsing HTML.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Pages
Data Fields
GumboOptions Struct Reference

#include <gumbo.h>

Data Fields

GumboAllocatorFunction allocator
 
GumboDeallocatorFunction deallocator
 
void * userdata
 
int tab_stop
 
bool stop_on_first_error
 
int max_errors
 

Detailed Description

Input struct containing configuration options for the parser. These let you specify alternate memory managers, provide different error handling, etc. Use kGumboDefaultOptions for sensible defaults, and only set what you need.

Field Documentation

GumboAllocatorFunction GumboOptions::allocator

A memory allocator function. Default: malloc.

GumboDeallocatorFunction GumboOptions::deallocator

A memory deallocator function. Default: free.

void* GumboOptions::userdata

An opaque object that's passed in as the first argument to all callbacks used by this library. Default: NULL.

int GumboOptions::tab_stop

The tab-stop size, for computing positions in source code that uses tabs. Default: 8.

bool GumboOptions::stop_on_first_error

Whether or not to stop parsing when the first error is encountered. Default: false.

int GumboOptions::max_errors

The maximum number of errors before the parser stops recording them. This is provided so that if the page is totally borked, we don't completely fill up the errors vector and exhaust memory with useless redundant errors. Set to -1 to disable the limit. Default: -1


The documentation for this struct was generated from the following file:
Gumbo: GumboOptions Struct Reference
Gumbo  1.0
A C library for parsing HTML.