2 * Copyright (c) 2007, Novell Inc.
4 * This program is licensed under the BSD license, read LICENSE.BSD
5 * for further information
8 #ifndef SATSOLVER_POOLARCH_H
9 #define SATSOLVER_POOLARCH_H
13 extern void pool_setarch(Pool *, const char *);
14 extern unsigned char pool_arch2color_slow(Pool *pool, Id arch);
16 #define ARCHCOLOR_32 1
17 #define ARCHCOLOR_64 2
18 #define ARCHCOLOR_ALL 255
20 static inline unsigned char pool_arch2color(Pool *pool, Id arch)
22 if (arch > pool->lastarch)
24 if (pool->id2color && pool->id2color[arch])
25 return pool->id2color[arch];
26 return pool_arch2color_slow(pool, arch);
29 static inline int pool_colormatch(Pool *pool, Solvable *s1, Solvable *s2)
31 if (s1->arch == s2->arch)
33 if ((pool_arch2color(pool, s1->arch) & pool_arch2color(pool, s2->arch)) != 0)
38 #endif /* SATSOLVER_POOLARCH_H */