[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem with new_item()
From: |
Clemens Ladisch |
Subject: |
Re: problem with new_item() |
Date: |
Wed, 26 May 2010 15:41:57 +0200 |
User-agent: |
Thunderbird 2.0.0.24 (Windows/20100228) |
pcazallas wrote:
> But after filling the whole ITEM** array, when I print the value of each
> item from the first, all of them have stored the last one given to
> new_item()...
Item's don't have their own buffers, they just remember the pointer
passed to new_item() (see the man page). It looks as if you used the
same buffer for all items.
You have to allocate a separate string buffer for each item.
HTH
Clemens