Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2006:
[Freeciv-Dev] Re: (PR#15126) patch: fc_free macro

[Freeciv-Dev] Re: (PR#15126) patch: fc_free macro

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] Re: (PR#15126) patch: fc_free macro
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 10 Jan 2006 11:00:24 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: >

Christian Prochaska wrote:
> <URL: >
> This patch adds a macro "fc_free" to utility/mem.h:
> #define fc_free(ptr)       { free(ptr); ptr = NULL; }
> It's meant to replace the "FREE" macro in gui-sdl/gui_mem.h (PR#3372),
> but might be useful at other places, too.

Such a macro violates the rules of function-looking macros.  That is, it 
looks like a function but it behaves as no function ever could.

If we have it (code like this is used in several places) it should be 


[Prev in Thread] Current Thread [Next in Thread]