]> xenbits.xensource.com Git - libvirt.git/commitdiff
util: hash: Make virHashCodeGen mockable
authorPeter Krempa <pkrempa@redhat.com>
Wed, 2 Aug 2017 15:31:14 +0000 (17:31 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 3 Aug 2017 07:49:15 +0000 (09:49 +0200)
Export the function from the util module so that dynamic linking can
override it.

src/libvirt_private.syms
src/util/virhashcode.h

index 054315fb7428a84e31e95d0dcce92f581411803b..32ac0835e937622aec1fc8cbaeff01cc0fceaa08 100644 (file)
@@ -1774,6 +1774,10 @@ virHashUpdateEntry;
 virHashValueFree;
 
 
+# util/virhashcode.h
+virHashCodeGen;
+
+
 # util/virhook.h
 virHookCall;
 virHookInitialize;
index 7732f816cfe07974ea01643f4d05aec3b7e3d4ac..f8171df2682897e63ff450524fc9476b7b512cc6 100644 (file)
@@ -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__ */