diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-06-17 20:38:39 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-06-17 20:38:39 +0000 |
commit | ffe4369510107162eea5a0e89a564b2fa039f55f (patch) | |
tree | 513b4deffa64033e31980289d97e4a6ef46d495e | |
parent | af6dc8be17a27d1b7939c5f4380ff5e7000e1e52 (diff) | |
download | perl-URPM-ffe4369510107162eea5a0e89a564b2fa039f55f.tar perl-URPM-ffe4369510107162eea5a0e89a564b2fa039f55f.tar.gz perl-URPM-ffe4369510107162eea5a0e89a564b2fa039f55f.tar.bz2 perl-URPM-ffe4369510107162eea5a0e89a564b2fa039f55f.tar.xz perl-URPM-ffe4369510107162eea5a0e89a564b2fa039f55f.zip |
(buildarchs,get_tag) better style
-rw-r--r-- | URPM.xs | 51 |
1 files changed, 17 insertions, 34 deletions
@@ -2079,26 +2079,16 @@ Pkg_buildarchs(pkg) PUTBACK; rpmTag tag; switch (ix) { - case 1: - tag = RPMTAG_EXCLUDEARCH; break; - case 2: - tag = RPMTAG_EXCLUSIVEARCH; break; - case 3: - tag = RPMTAG_DIRNAMES; break; - case 4: - tag = RPMTAG_FILELINKTOS; break; - case 6: - tag = RPMTAG_FILEMD5S; break; - case 7: - tag = RPMTAG_FILEUSERNAME; break; - case 8: - tag = RPMTAG_FILEGROUPNAME; break; - case 9: - tag = RPMTAG_CHANGELOGNAME; break; - case 10: - tag = RPMTAG_CHANGELOGTEXT; break; - default: - tag = RPMTAG_BUILDARCHS; break; + case 1: tag = RPMTAG_EXCLUDEARCH; break; + case 2: tag = RPMTAG_EXCLUSIVEARCH; break; + case 3: tag = RPMTAG_DIRNAMES; break; + case 4: tag = RPMTAG_FILELINKTOS; break; + case 6: tag = RPMTAG_FILEMD5S; break; + case 7: tag = RPMTAG_FILEUSERNAME; break; + case 8: tag = RPMTAG_FILEGROUPNAME; break; + case 9: tag = RPMTAG_CHANGELOGNAME; break; + case 10: tag = RPMTAG_CHANGELOGTEXT; break; + default: tag = RPMTAG_BUILDARCHS; break; } xpush_simple_list_str(pkg->h, tag); SPAGAIN; @@ -2132,20 +2122,13 @@ Pkg_files_mtime(pkg) PUTBACK; rpmTag tag; switch (ix) { - case 1: - tag = RPMTAG_FILESIZES; break; - case 2: - tag = RPMTAG_FILEUIDS; break; - case 3: - tag = RPMTAG_FILEGIDS; break; - case 4: - tag = RPMTAG_FILEMODES; break; - case 5: - tag = RPMTAG_FILEFLAGS; break; - case 6: - tag = RPMTAG_CHANGELOGTIME; break; - default: - tag = RPMTAG_FILEMTIMES; break; + case 1: tag = RPMTAG_FILESIZES; break; + case 2: tag = RPMTAG_FILEUIDS; break; + case 3: tag = RPMTAG_FILEGIDS; break; + case 4: tag = RPMTAG_FILEMODES; break; + case 5: tag = RPMTAG_FILEFLAGS; break; + case 6: tag = RPMTAG_CHANGELOGTIME; break; + default: tag = RPMTAG_FILEMTIMES; break; } return_list_number(pkg->h, tag); SPAGAIN; |