Rob Shearman : widl: Swap the version packing order back to what typelibs expect.

Alexandre Julliard julliard at winehq.org
Thu Dec 13 08:23:15 CST 2007


Module: wine
Branch: master
Commit: 00db711c6feffedaa80e3e72ad7193cff6661f91
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=00db711c6feffedaa80e3e72ad7193cff6661f91

Author: Rob Shearman <rob at codeweavers.com>
Date:   Thu Dec 13 12:40:23 2007 +0000

widl: Swap the version packing order back to what typelibs expect.

---

 tools/widl/utils.h |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/tools/widl/utils.h b/tools/widl/utils.h
index 1cd3dd3..7d6ce5c 100644
--- a/tools/widl/utils.h
+++ b/tools/widl/utils.h
@@ -46,8 +46,10 @@ size_t widl_getline(char **linep, size_t *lenp, FILE *fp);
 UUID *parse_uuid(const char *u);
 int is_valid_uuid(const char *s);
 
-#define MAKEVERSION(major, minor) ((((major) & 0xffff) << 16) | ((minor) & 0xffff))
-#define MAJORVERSION(version) (((version) >> 16) & 0xffff)
-#define MINORVERSION(version) ((version) & 0xffff)
+/* typelibs expect the minor version to be stored in the higher bits and
+ * major to be stored in the lower bits */
+#define MAKEVERSION(major, minor) ((((minor) & 0xffff) << 16) | ((major) & 0xffff))
+#define MAJORVERSION(version) ((version) & 0xffff)
+#define MINORVERSION(version) (((version) >> 16) & 0xffff)
 
 #endif




More information about the wine-cvs mailing list