prev tail pointer, vbulletin,jelsoft,forum,bbs,discussion,bulletin board" /> prev tail pointer ArchLinux Pacman Development" /> [pacman-dev] There is a "problem" with list->prev tail pointer - Linux Archive
FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 11-20-2007, 02:46 PM
Nagy Gabor
 
Default [pacman-dev] There is a "problem" with list->prev tail pointer

Look at the following code-part:

for(i = list; i; i = i->next) {
alpm_list_foo(i); /*WARNING!!*/
}

Comment:
So a node in a list (i in the example) is NOT a valid alpm_list_t:
You can do alpm_list_getdata for example, but not alpm_list_add.
This is very confusing to me.
We should somehow differeniate between alpm_list_t and alpm_list_node_t types,
so at least force the compiler to give a warning message.

Bye

----------------------------------------------------
SZTE Egyetemi Könyvtár - http://www.bibl.u-szeged.hu
This mail sent through IMP: http://horde.org/imp/


_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 11-20-2007, 08:08 PM
"Aaron Griffin"
 
Default [pacman-dev] There is a "problem" with list->prev tail pointer

On Nov 20, 2007 9:46 AM, Nagy Gabor <ngaba@bibl.u-szeged.hu> wrote:
> Look at the following code-part:
>
> for(i = list; i; i = i->next) {
> alpm_list_foo(i); /*WARNING!!*/
> }
>
> Comment:
> So a node in a list (i in the example) is NOT a valid alpm_list_t:
> You can do alpm_list_getdata for example, but not alpm_list_add.
> This is very confusing to me.
> We should somehow differeniate between alpm_list_t and alpm_list_node_t types,
> so at least force the compiler to give a warning message.

That's only half solving the problem. In reality, our list structure
kinda sucks. We've talked before about replacing it with something
better, and I would much rather see something like that then discuss
the semantics and usage of our current implementation which we all
have already agreed is a little lacking.

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 

Thread Tools




All times are GMT. The time now is 12:50 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org