[pacman-dev] [PATCH 09/13] Require handle for alpm_find_grp_pkgs()

Allan McRae allan at archlinux.org
Tue Jun 7 19:38:41 EDT 2011


On 08/06/11 08:29, Dan McGee wrote:
> On Tue, Jun 7, 2011 at 5:19 PM, Rémy Oudompheng
> <remyoudompheng at gmail.com>  wrote:
>> On 2011/6/7 Dan McGee<dan at archlinux.org>  wrote:
>>> -alpm_list_t SYMEXPORT *alpm_find_grp_pkgs(alpm_list_t *dbs,
>>> +alpm_list_t SYMEXPORT *alpm_find_grp_pkgs(pmhandle_t *handle, alpm_list_t *dbs,
>>>                 const char *name)
>>>   {
>>>         alpm_list_t *i, *j, *pkgs = NULL, *ignorelist = NULL;
>>
>> I don't see where the handle is needed in this function.
>
> It's needed in the subsequent patches that move pm_errno to the
> handle; I tried anything to make that one smaller and this was one bit
> that could be split out. Barely worth it, I know, but trying every
> little bit...
>

It that for subsequent patches in this patchset or future patches?  At 
the end of the current patchset, I find these two functions that do not 
use the handle argument:


diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index 7071e89..ceae3f8 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -538,7 +538,7 @@ pmpkg_t *_alpm_pkg_find(alpm_list_t *haystack, const 
char *n
   *
   * @return 1 if the package should be ignored, 0 otherwise
   */
-int _alpm_pkg_should_ignore(pmhandle_t *handle, pmpkg_t *pkg)
+int _alpm_pkg_should_ignore(pmhandle_t UNUSED *handle, pmpkg_t *pkg)
  {
         alpm_list_t *groups = NULL;

diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 81d4de2..2652424 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -213,7 +213,7 @@ int SYMEXPORT alpm_sync_sysupgrade(pmhandle_t 
*handle, int e
   * @param name the name of the group
   * @return the list of pmpkg_t * (caller is responsible for 
alpm_list_free)
   */
-alpm_list_t SYMEXPORT *alpm_find_grp_pkgs(pmhandle_t *handle, 
alpm_list_t *dbs,
+alpm_list_t SYMEXPORT *alpm_find_grp_pkgs(pmhandle_t UNUSED *handle, 
alpm_list_



More information about the pacman-dev mailing list