diff options
author | Timo Teräs <timo.teras@iki.fi> | 2013-04-29 14:13:25 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2013-04-29 14:14:57 +0300 |
commit | 84bfef1a6b587a7da7d12fb701ab0d1d5d6ce2a9 (patch) | |
tree | fdd58afa69801d893f7840d44a6810e0cde87a88 /src/apk_solver_data.h | |
parent | 4c08eca3bb844ed51acab1461327f3dd01ce1866 (diff) | |
download | apk-tools-84bfef1a6b587a7da7d12fb701ab0d1d5d6ce2a9.tar.gz apk-tools-84bfef1a6b587a7da7d12fb701ab0d1d5d6ce2a9.tar.bz2 apk-tools-84bfef1a6b587a7da7d12fb701ab0d1d5d6ce2a9.tar.xz apk-tools-84bfef1a6b587a7da7d12fb701ab0d1d5d6ce2a9.zip |
solver: increase score fields to 32-bits (from 16-bits)
We are having so many packages that they might overflow otherwise.
"ERROR: Preference overflow" was already reported.
Diffstat (limited to 'src/apk_solver_data.h')
-rw-r--r-- | src/apk_solver_data.h | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/src/apk_solver_data.h b/src/apk_solver_data.h index 5777325..8076a08 100644 --- a/src/apk_solver_data.h +++ b/src/apk_solver_data.h @@ -17,24 +17,10 @@ #include "apk_provider_data.h" struct apk_score { - union { - struct { -#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ - unsigned short preference; - unsigned short non_preferred_pinnings; - unsigned short non_preferred_actions; - unsigned short unsatisfied; -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ - unsigned short unsatisfied; - unsigned short non_preferred_actions; - unsigned short non_preferred_pinnings; - unsigned short preference; -#else -#error Unknown endianess. -#endif - }; - uint64_t score; - }; + uint32_t unsatisfied; + uint32_t non_preferred_actions; + uint32_t non_preferred_pinnings; + uint32_t preference; }; struct apk_solver_name_state { |