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

oldstable
Rob Shearman 2007-12-13 12:40:23 +00:00 committed by Alexandre Julliard
parent 3c9e7aba75
commit 00db711c6f
1 changed files with 5 additions and 3 deletions

View File

@ -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