1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-05 19:01:18 +03:00

Deprecate IDREF-related functions in valid.h

These functions are only needed internally for validation.

xmlGetRefs is inherently unsafe because the ref table isn't updated
if attributes are removed (unlike the ids table).

None of the Ubuntu 20.04 packages depending on libxml2 use any of these
functions (except xmlFreeRefTable in libxslt), so it seems perfectly
safe to deprecate them.

Remove xmlIsRef and xmlRemoveRef from the Python bindings.
This commit is contained in:
Nick Wellnhofer
2022-02-20 19:02:31 +01:00
parent 61de92979b
commit 004fe9de53
3 changed files with 22 additions and 0 deletions

View File

@ -289,7 +289,14 @@ skip_impl = (
'xmlSaveFormatFileTo',
)
deprecated_funcs = {
'xmlIsRef': True,
'xmlRemoveRef': True,
}
def skip_function(name):
if name in deprecated_funcs:
return 1
if name[0:12] == "xmlXPathWrap":
return 1
if name == "xmlFreeParserCtxt":