[Spice-devel] [PATCH spice-gtk 1/3] Add SPICE_TWEAK_DEFINE and SPICE_TWEAK macros

Christophe de Dinechin christophe at dinechin.org
Thu Jul 13 14:57:26 UTC 2017


From: Christophe de Dinechin <dinechin at redhat.com>

These two macros are intended to identify places in the code where there
are ad-hoc values that can be tweaked to optimize behavior. They may be
connected later to a mechanism that allows such "tweaks" to be made
without recompiling, e.g. by passing environment variables.

Signed-off-by: Christophe de Dinechin <dinechin at redhat.com>
---
 src/spice-util.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/spice-util.h b/src/spice-util.h
index 1d80f1c..9aa346b 100644
--- a/src/spice-util.h
+++ b/src/spice-util.h
@@ -38,6 +38,9 @@ gchar* spice_uuid_to_string(const guint8 uuid[16]);
             g_debug(G_STRLOC " " fmt, ## __VA_ARGS__);          \
     } while (0)
 
+#define SPICE_TWEAK_DEFINE(Name, Value, Description)    gint64 Name = Value
+#define SPICE_TWEAK(Name)                               (Name)
+
 #define SPICE_RESERVED_PADDING (10 * sizeof(void*))
 
 G_END_DECLS
-- 
2.11.0 (Apple Git-81)



More information about the Spice-devel mailing list