[PATCH v3 0/2] Optimize magic constants

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

 



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 v2:
- small syntax fix;
- make header self contained.

Changes from v1:
- check compiler in macros.h, do not add an extra file;
- use << and | to compute constant.
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   |  3 ++-
 spice/foreign_menu_prot.h |  3 ++-
 spice/macros.h            | 63 +++++++++++++++++++++++++++++++++++++++++++++++
 spice/protocol.h          |  3 ++-
 spice/qxl_dev.h           |  5 ++--
 spice/stats.h             |  3 ++-
 spice/vdi_dev.h           |  3 ++-
 7 files changed, 76 insertions(+), 7 deletions(-)

-- 
2.4.3

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]