[pacman-dev] proposition: alpm_list type
Currently the "alpm_list" type is considered fairly "private", hiding (through the use of the _ prefix) a handful of useful routines. I suggest this interface be exposed in full. This will allow us to remove the 'list' type from pacman's source and just reuse alpm_list. Somewhere in the design docs it says "ALPM shouldn't force the use of a given list type". It doesn't, and still won't. Functions which return an alpm_list now still need the accessors to get at the list, and still must be copied into a custom list type. In fact, alpm _requires_ a custom list. Does anyone have any issues with this?
On 1/17/07, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
Currently the "alpm_list" type is considered fairly "private", hiding (through the use of the _ prefix) a handful of useful routines.
I suggest this interface be exposed in full. This will allow us to remove the 'list' type from pacman's source and just reuse alpm_list.
Does anyone have any issues with this?
I like the idea. This is the same as many other C libraries which provide their own type for convenience- it isn't required but highly useful, so no need to hide it from front ends that want to use it. -Dan
2007/1/17, Dan McGee <dpmcgee@gmail.com>:
On 1/17/07, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
Currently the "alpm_list" type is considered fairly "private", hiding (through the use of the _ prefix) a handful of useful routines.
I suggest this interface be exposed in full. This will allow us to remove the 'list' type from pacman's source and just reuse alpm_list.
Does anyone have any issues with this?
I like the idea. This is the same as many other C libraries which provide their own type for convenience- it isn't required but highly useful, so no need to hide it from front ends that want to use it.
I second that. -- Roman Kyrylych (Роман Кирилич)
On Wed, Jan 17, 2007 at 03:37:06PM -0600, Aaron Griffin wrote:
Currently the "alpm_list" type is considered fairly "private", hiding (through the use of the _ prefix) a handful of useful routines.
I suggest this interface be exposed in full. This will allow us to remove the 'list' type from pacman's source and just reuse alpm_list.
I like that: Less code-duplication. Less bugs. Jürgen
On 1/17/07, Jürgen Hötzel <juergen@hoetzel.info> wrote:
On Wed, Jan 17, 2007 at 03:37:06PM -0600, Aaron Griffin wrote:
Currently the "alpm_list" type is considered fairly "private", hiding (through the use of the _ prefix) a handful of useful routines.
Should it be renamed if it is going to be public? Something along the lines of alpmlist_t?
On 1/17/07, Dan McGee <dpmcgee@gmail.com> wrote:
On 1/17/07, Jürgen Hötzel <juergen@hoetzel.info> wrote:
On Wed, Jan 17, 2007 at 03:37:06PM -0600, Aaron Griffin wrote:
Currently the "alpm_list" type is considered fairly "private", hiding (through the use of the _ prefix) a handful of useful routines.
Should it be renamed if it is going to be public? Something along the lines of alpmlist_t?
Yeah, I was going to go with alpm_list_t, just to keep the underscore scheme going.
So I made some changes with regard to this... problem is that the commit diff was 140K where the list limit is 40K. (This is why I asked if this will bother anyone on the list). Needless to say, it was sent to the mod queue, which I don't have permissions on. I think I introduced one or two "memory leaks" though (NOTE: that's in quotes because pacman is so short running leaking a few K here and there is not an issue, but it's still bad.) It was a prelim checkin, so I'll finish up some fixes and all that jazz today.
participants (4)
-
Aaron Griffin
-
Dan McGee
-
Jürgen Hötzel
-
Roman Kyrylych