Subject: Re: [PATCHv2 27/56] string-list: Add API to remove an item from an unsorted list

From: Johannes Sixt <[email-masked]>
Date: Fri, 12 Aug 2011 09:00:45 +0200

Am 8/12/2011 7:20, schrieb Elijah Newren:
> Here's an attempt for a delete_item API (note: only compile-tested).

Seriously? You haven't even tested this patch, and still don't mark it
with RFC?

> Bike-shed painters welcome: delete_item, remove_item, free_item?

You should know that a sentence like this shouldn't appear in the commit
message.

Yeah, I know, you just copy-pasted my email text. But that was not a
commit message. Perhaps like this:

    This implements removal of an entry in O(1) runtime by moving
    the last entry to the vacated spot. As such, the routine works
    only for unsorted lists.

BTW, the code does this:

> +	list->items[i] = list->items[list->nr-1];

i.e., it assigns an entire struct. Is this perhaps problematic with older
C compilers? (I don't know, I'm more used to C++, where this is well-defined.)

-- Hannes