aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-11-01 14:50:24 +0000
committerThierry Vignaud <tv@mageia.org>2012-11-01 14:50:24 +0000
commit5de60c8e8aa8feefa5c09ea37d5dd441135fc243 (patch)
tree2b862a9f7040f11c4dc41e56db2df82825c54492 /URPM.xs
parent349a648379f1614160cd9fc6458f6b8b204bbc06 (diff)
downloadperl-URPM-5de60c8e8aa8feefa5c09ea37d5dd441135fc243.tar
perl-URPM-5de60c8e8aa8feefa5c09ea37d5dd441135fc243.tar.gz
perl-URPM-5de60c8e8aa8feefa5c09ea37d5dd441135fc243.tar.bz2
perl-URPM-5de60c8e8aa8feefa5c09ea37d5dd441135fc243.tar.xz
perl-URPM-5de60c8e8aa8feefa5c09ea37d5dd441135fc243.zip
rename FLAG_RATE as FLAG_RATE_MASK as it really is a mask
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs8
1 files changed, 4 insertions, 4 deletions
diff --git a/URPM.xs b/URPM.xs
index 70d5805..e93f982 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -78,7 +78,7 @@ typedef struct s_Transaction* URPM__Transaction;
typedef struct s_Package* URPM__Package;
#define FLAG_ID_MASK 0x001fffffU
-#define FLAG_RATE 0x00e00000U
+#define FLAG_RATE_MASK 0x00e00000U
#define FLAG_BASE 0x01000000U
#define FLAG_SKIP 0x02000000U
#define FLAG_DISABLE_OBSOLETE 0x04000000U
@@ -2276,7 +2276,7 @@ int
Pkg_rate(pkg)
URPM::Package pkg
CODE:
- RETVAL = (pkg->flag & FLAG_RATE) >> FLAG_RATE_POS;
+ RETVAL = (pkg->flag & FLAG_RATE_MASK) >> FLAG_RATE_POS;
OUTPUT:
RETVAL
@@ -2285,8 +2285,8 @@ Pkg_set_rate(pkg, rate)
URPM::Package pkg
int rate
CODE:
- RETVAL = (pkg->flag & FLAG_RATE) >> FLAG_RATE_POS;
- pkg->flag &= ~FLAG_RATE;
+ RETVAL = (pkg->flag & FLAG_RATE_MASK) >> FLAG_RATE_POS;
+ pkg->flag &= ~FLAG_RATE_MASK;
pkg->flag |= (rate >= 0 && rate <= FLAG_RATE_MAX ? rate : FLAG_RATE_INVALID) << FLAG_RATE_POS;
OUTPUT:
RETVAL