summaryrefslogtreecommitdiff
path: root/valid.c
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2022-02-20 19:02:31 +0100
committerNick Wellnhofer <wellnhofer@aevum.de>2022-02-20 21:49:05 +0100
commit004fe9de53ec33133e6cafbe5850ebc9a1d1cdcf (patch)
treea148e1cd397eeb83cc41d20b70d9f27ab801bc2e /valid.c
parent61de92979b530afb013add8f7e4d293930dd8e8e (diff)
downloadlibxml2-004fe9de53ec33133e6cafbe5850ebc9a1d1cdcf.tar.gz
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.
Diffstat (limited to 'valid.c')
-rw-r--r--valid.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/valid.c b/valid.c
index 23f868a3..d1df2d50 100644
--- a/valid.c
+++ b/valid.c
@@ -3000,6 +3000,8 @@ xmlDummyCompare(const void *data0 ATTRIBUTE_UNUSED,
* @value: the value name
* @attr: the attribute holding the Ref
*
+ * DEPRECATED, do not use. This function will be removed from the public API.
+ *
* Register a new ref declaration
*
* Returns NULL if not, otherwise the new xmlRefPtr
@@ -3100,6 +3102,8 @@ failed:
* xmlFreeRefTable:
* @table: An ref table
*
+ * DEPRECATED, do not use. This function will be removed from the public API.
+ *
* Deallocate the memory used by an Ref hash table.
*/
void
@@ -3113,6 +3117,8 @@ xmlFreeRefTable(xmlRefTablePtr table) {
* @elem: the element carrying the attribute
* @attr: the attribute
*
+ * DEPRECATED, do not use. This function will be removed from the public API.
+ *
* Determine whether an attribute is of type Ref. In case we have DTD(s)
* then this is simple, otherwise we use an heuristic: name Ref (upper
* or lowercase).
@@ -3155,6 +3161,8 @@ xmlIsRef(xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr) {
* @doc: the document
* @attr: the attribute
*
+ * DEPRECATED, do not use. This function will be removed from the public API.
+ *
* Remove the given attribute from the Ref table maintained internally.
*
* Returns -1 if the lookup failed and 0 otherwise
@@ -3211,6 +3219,8 @@ xmlRemoveRef(xmlDocPtr doc, xmlAttrPtr attr) {
* @doc: pointer to the document
* @ID: the ID value
*
+ * DEPRECATED, do not use. This function will be removed from the public API.
+ *
* Find the set of references for the supplied ID.
*
* Returns NULL if not found, otherwise node set for the ID.