[PATCH 2/3] util: hash: Make virHashCodeGen mockable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Export the function from the util module so that dynamic linking can
override it.
---
 src/libvirt_private.syms | 4 ++++
 src/util/virhashcode.h   | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 054315fb7..32ac0835e 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1774,6 +1774,10 @@ virHashUpdateEntry;
 virHashValueFree;


+# util/virhashcode.h
+virHashCodeGen;
+
+
 # util/virhook.h
 virHookCall;
 virHookInitialize;
diff --git a/src/util/virhashcode.h b/src/util/virhashcode.h
index 7732f816c..f8171df26 100644
--- a/src/util/virhashcode.h
+++ b/src/util/virhashcode.h
@@ -30,6 +30,7 @@

 # include "internal.h"

-uint32_t virHashCodeGen(const void *key, size_t len, uint32_t seed);
+uint32_t virHashCodeGen(const void *key, size_t len, uint32_t seed)
+    ATTRIBUTE_NOINLINE;

 #endif /* __VIR_HASH_CODE_H__ */
-- 
2.13.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux