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:
committed by
Nick Wellnhofer
parent
a4517bfeaf
commit
bbbbbb4649
19
parser.c
19
parser.c
@@ -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
|
||||
|
Reference in New Issue
Block a user