vext01/libdefile — comment on commit 1ffde1bb0c708374079a6e9b22252c93e5b39167
File:  line 0
By vext01:

On Tue, Oct 25, 2011 at 07:16:19PM +0100, Edd Barrett wrote:
> On Tue, Oct 25, 2011 at 11:12:13AM -0700, Christiano F. Haesbaert wrote:
> > I beg to disagree, the pointer is lost, so it's a leak. If you free it
> > before reassigning, I'm ok.
>
> Bah, yes. My bad. Sorry.
>
> > But then I don't see any point in heap allocing something which is
> > kept in a global state and can only come from a constant define or
> > from argv[].
>
> but can you do: some_struct.member = "string literal" ?

Wait, you can?!

I have been hacking C for years and I never knew this! FML.

--
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk