diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-04-07 09:31:21 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-04-07 12:19:41 +0300 |
commit | d728ec28dcb51a139859e4fed48da894a8363a51 (patch) | |
tree | 1e210e8e97c563999f6909fa525972777a58101f | |
parent | a5533d9604770d16942e44d8c68cd28228bc3d2b (diff) | |
download | rpm-d728ec28dcb51a139859e4fed48da894a8363a51.tar.gz rpm-d728ec28dcb51a139859e4fed48da894a8363a51.tar.bz2 rpm-d728ec28dcb51a139859e4fed48da894a8363a51.zip |
Remove ARGstr_t typedef, it serves no purpose
- argv strings are just regular strings, the structure is what's special
-rw-r--r-- | rpmio/argv.c | 8 | ||||
-rw-r--r-- | rpmio/argv.h | 5 |
2 files changed, 6 insertions, 7 deletions
diff --git a/rpmio/argv.c b/rpmio/argv.c index c39c9d118..2e26c93be 100644 --- a/rpmio/argv.c +++ b/rpmio/argv.c @@ -76,8 +76,8 @@ ARGV_t argvData(const ARGV_t argv) int argvCmp(const void * a, const void * b) { - ARGstr_t astr = *(ARGV_t)a; - ARGstr_t bstr = *(ARGV_t)b; + const char *astr = *(ARGV_t)a; + const char *bstr = *(ARGV_t)b; return strcmp(astr, bstr); } @@ -89,7 +89,7 @@ int argvSort(ARGV_t argv, int (*compar)(const void *, const void *)) return 0; } -ARGV_t argvSearch(ARGV_t argv, ARGstr_t val, +ARGV_t argvSearch(ARGV_t argv, const char *val, int (*compar)(const void *, const void *)) { if (argv == NULL) @@ -120,7 +120,7 @@ int argiAdd(ARGI_t * argip, int ix, int val) return 0; } -int argvAdd(ARGV_t * argvp, ARGstr_t val) +int argvAdd(ARGV_t * argvp, const char *val) { ARGV_t argv; int argc; diff --git a/rpmio/argv.h b/rpmio/argv.h index e3bbcc126..840cb19c4 100644 --- a/rpmio/argv.h +++ b/rpmio/argv.h @@ -11,7 +11,6 @@ extern "C" { #endif -typedef const char * ARGstr_t; typedef char ** ARGV_t; typedef int * ARGint_t; @@ -94,7 +93,7 @@ int argvSort(ARGV_t argv, int (*compar)(const void *, const void *)); * @param compar strcmp-like comparison function, or NULL for argvCmp() * @return found string (NULL on failure) */ -ARGV_t argvSearch(ARGV_t argv, ARGstr_t val, +ARGV_t argvSearch(ARGV_t argv, const char *val, int (*compar)(const void *, const void *)); /** \ingroup rpmargv @@ -112,7 +111,7 @@ int argiAdd(ARGI_t * argip, int ix, int val); * @param val string arg to append * @return 0 always */ -int argvAdd(ARGV_t * argvp, ARGstr_t val); +int argvAdd(ARGV_t * argvp, const char *val); /** \ingroup rpmargv * Append one argv array to another. |