[pacman-dev] [PATCH] New alpm_list_join function

Nagy Gabor ngaba at bibl.u-szeged.hu
Tue Nov 20 10:56:58 EST 2007


> There isn't one comment in here, and that needs to change. Our list
> tail pointer makes it a bit hard to tell what is going on without
> comments, so can you please add one?
> 
> Something like (but don't copy this if its wrong!):
> 
> /* tmp is used to hold the original tail of first,
>   and the tail pointer of the joined list will point
>   to the tail of *second */
> 
> Wouldn't *last even be better than *tmp?
> 
This seems to be correct. But atm I cannot resubmit it; and I'd be happy if I
shouldn't resubmit a s/tmp/last/ change ;-) <- this is a trivial sed on my
patch. Always feel free to modify my patches without asking me: I don't really
care if you use tmp or last variable, rename my function names; and if you make
a mistake (and I catch your bug), probably I will complaint as always ;-)

Anyway, thx for the question, because now I noticed, that I forgot to comment
something: /* the input lists must NOT overlap */ <- for example
alpm_list_join(list, list) ovbiously doesn't do the "expected" thing.

Bye


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





More information about the pacman-dev mailing list