[Spice-devel] [PATCH v2 0/2] Optimize magic constants
Frediano Ziglio
fziglio at redhat.com
Tue Aug 11 02:41:10 PDT 2015
Magic constants in Spice headers are defines as string dereference.
This cause possible warnings and sub-optimization while a simple
constant can be used.
Compute a constant at compile time using some helper macro.
Changes from v1:
- check compiler in macros.h, do not add an extra file;
- use << and | to compute constant.
Frediano Ziglio (2):
Detects processor endianess using preprocessor
Define and use new SPICE_MAGIC_CONST macro
spice/controller_prot.h | 2 +-
spice/foreign_menu_prot.h | 2 +-
spice/macros.h | 63 +++++++++++++++++++++++++++++++++++++++++++++++
spice/protocol.h | 2 +-
spice/qxl_dev.h | 4 +--
spice/stats.h | 2 +-
spice/vdi_dev.h | 2 +-
7 files changed, 70 insertions(+), 7 deletions(-)
--
2.1.0
More information about the Spice-devel
mailing list