[pacman-dev] [PATCH] generalize alpm_list_find_str

Xavier shiningxc at gmail.com
Fri Nov 16 12:14:32 EST 2007


On Fri, Nov 16, 2007 at 05:41:03PM +0100, Nagy Gabor wrote:
> From 06d48a8bd7b5ada59b4e8daad58f6eb6b40de4e7 Mon Sep 17 00:00:00 2001
> From: Nagy Gabor <ngaba at bibl.u-szeged.hu>
> Date: Fri, 16 Nov 2007 17:25:23 +0100
> Subject: [PATCH] generalize alpm_list_find_str
> 
> This patch renames alpm_list_find_str to alpm_list_find and adds a new "comparison function" parameter to it.
> The old alpm_list_find is renamed to alpm_list_find_ptr.
> 

Since its generally strcmp which is used, why not having, besides your
generic alpm_list_find, an alpm_list_find_str, which would just call
alpm_list_find with strcmp ?
It looks annoying to have to add that casted strmcp argument every time.




More information about the pacman-dev mailing list