aboutsummaryrefslogtreecommitdiffstats
path: root/hash.c
diff options
context:
space:
mode:
authorakirilov <akirilov@google.com>2018-06-01 13:46:04 -0700
committersyphyr <syphyr@gmail.com>2018-09-06 04:08:09 +0200
commit126c3993d2ad55db2abfe80e3d671bf584e7b13b (patch)
treef4464c225863c997e3f99d9897131f9f28df76fe /hash.c
parent521b88fbb6d18312923f0df653d045384b500ffc (diff)
downloadandroid_external_libxml2-cm-13.0.tar.gz
android_external_libxml2-cm-13.0.tar.bz2
android_external_libxml2-cm-13.0.zip
Merge to pi-dev and restore Android.mk Bug: 79662501 Bug: 36809766 Bug: 36810305 Bug: 62151041 Test: manually verify functionality for regression Change-Id: Ife351c91c932eb92992656f8ea5c08724a220306 (cherry picked from commit 4e91cfdbb1a8624e5cd5a850d6e17da11d1e34a8)
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/hash.c b/hash.c
index f9a20172..b0b4abc9 100644
--- a/hash.c
+++ b/hash.c
@@ -168,7 +168,7 @@ xmlHashComputeQKey(xmlHashTablePtr table,
*
* Create a new xmlHashTablePtr.
*
- * Returns the newly created object, or NULL if an error occured.
+ * Returns the newly created object, or NULL if an error occurred.
*/
xmlHashTablePtr
xmlHashCreate(int size) {
@@ -202,7 +202,7 @@ xmlHashCreate(int size) {
*
* Create a new xmlHashTablePtr which will use @dict as the internal dictionary
*
- * Returns the newly created object, or NULL if an error occured.
+ * Returns the newly created object, or NULL if an error occurred.
*/
xmlHashTablePtr
xmlHashCreateDict(int size, xmlDictPtr dict) {
@@ -361,6 +361,18 @@ xmlHashFree(xmlHashTablePtr table, xmlHashDeallocator f) {
}
/**
+ * xmlHashDefaultDeallocator:
+ * @entry: the hash table entry
+ * @name: the entry's name
+ *
+ * Free a hash table entry with xmlFree.
+ */
+void
+xmlHashDefaultDeallocator(void *entry, const xmlChar *name ATTRIBUTE_UNUSED) {
+ xmlFree(entry);
+}
+
+/**
* xmlHashAddEntry:
* @table: the hash table
* @name: the name of the userdata
@@ -912,8 +924,11 @@ void
xmlHashScan3(xmlHashTablePtr table, const xmlChar *name,
const xmlChar *name2, const xmlChar *name3,
xmlHashScanner f, void *data) {
- xmlHashScanFull3 (table, name, name2, name3,
- (xmlHashScannerFull) f, data);
+ stubData stubdata;
+ stubdata.data = data;
+ stubdata.hashscanner = f;
+ xmlHashScanFull3(table, name, name2, name3, stubHashScannerFull,
+ &stubdata);
}
/**