diff options
-rw-r--r-- | URPM.xs | 67 |
1 files changed, 18 insertions, 49 deletions
@@ -2310,14 +2310,6 @@ Pkg_set_flag(pkg, name, value=1) RETVAL int -Pkg_flag_skip(pkg) - URPM::Package pkg - CODE: - RETVAL = pkg->flag & FLAG_SKIP; - OUTPUT: - RETVAL - -int Pkg_set_flag_skip(pkg, value=1) URPM::Package pkg int value @@ -2329,14 +2321,6 @@ Pkg_set_flag_skip(pkg, value=1) RETVAL int -Pkg_flag_base(pkg) - URPM::Package pkg - CODE: - RETVAL = pkg->flag & FLAG_BASE; - OUTPUT: - RETVAL - -int Pkg_set_flag_base(pkg, value=1) URPM::Package pkg int value @@ -2348,14 +2332,6 @@ Pkg_set_flag_base(pkg, value=1) RETVAL int -Pkg_flag_disable_obsolete(pkg) - URPM::Package pkg - CODE: - RETVAL = pkg->flag & FLAG_DISABLE_OBSOLETE; - OUTPUT: - RETVAL - -int Pkg_set_flag_disable_obsolete(pkg, value=1) URPM::Package pkg int value @@ -2367,14 +2343,6 @@ Pkg_set_flag_disable_obsolete(pkg, value=1) RETVAL int -Pkg_flag_installed(pkg) - URPM::Package pkg - CODE: - RETVAL = pkg->flag & FLAG_INSTALLED; - OUTPUT: - RETVAL - -int Pkg_set_flag_installed(pkg, value=1) URPM::Package pkg int value @@ -2386,14 +2354,6 @@ Pkg_set_flag_installed(pkg, value=1) RETVAL int -Pkg_flag_requested(pkg) - URPM::Package pkg - CODE: - RETVAL = pkg->flag & FLAG_REQUESTED; - OUTPUT: - RETVAL - -int Pkg_set_flag_requested(pkg, value=1) URPM::Package pkg int value @@ -2407,8 +2367,25 @@ Pkg_set_flag_requested(pkg, value=1) int Pkg_flag_required(pkg) URPM::Package pkg + ALIAS: + flag_upgrade = 1 + flag_disable_obsolete = 2 + flag_requested = 3 + flag_installed = 4 + flag_base = 5 + flag_skip = 6 CODE: - RETVAL = pkg->flag & FLAG_REQUIRED; + unsigned flag; + switch (ix) { + case 0: flag = FLAG_REQUIRED; break; + case 1: flag = FLAG_UPGRADE; break; + case 2: flag = FLAG_DISABLE_OBSOLETE; break; + case 3: flag = FLAG_REQUESTED; break; + case 4: flag = FLAG_INSTALLED; break; + case 5: flag = FLAG_BASE; break; + case 6: flag = FLAG_SKIP; break; + } + RETVAL = pkg->flag & flag; OUTPUT: RETVAL @@ -2424,14 +2401,6 @@ Pkg_set_flag_required(pkg, value=1) RETVAL int -Pkg_flag_upgrade(pkg) - URPM::Package pkg - CODE: - RETVAL = pkg->flag & FLAG_UPGRADE; - OUTPUT: - RETVAL - -int Pkg_set_flag_upgrade(pkg, value=1) URPM::Package pkg int value |