1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-23 01:52:48 +03:00

parser: implement xmlCtxtGetOptions

In 712a31ab, the `options` struct member was deprecated. To allow
callers to check the status of options bits, introduce
xmlCtxtGetOptions.
This commit is contained in:
Mike Dalessio
2024-06-20 03:19:48 -04:00
committed by Nick Wellnhofer
parent a4517bfeaf
commit bbbbbb4649
4 changed files with 61 additions and 1 deletions

View File

@@ -13594,6 +13594,25 @@ xmlCtxtSetOptions(xmlParserCtxtPtr ctxt, int options)
return(xmlCtxtSetOptionsInternal(ctxt, options, 0));
}
/**
* xmlCtxtGetOptions:
* @ctxt: an XML parser context
*
* Get the current options of the parser context.
*
* Available since 2.14.0.
*
* Returns the current options set in the parser context, or -1 if ctxt is NULL.
*/
int
xmlCtxtGetOptions(xmlParserCtxtPtr ctxt)
{
if (ctxt == NULL)
return(-1);
return(ctxt->options);
}
/**
* xmlCtxtUseOptions:
* @ctxt: an XML parser context