[Freeciv-Dev] Re: (PR#15126) patch: fc_free macro
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=15126 >
Christian Prochaska wrote:
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=15126 >
>
> 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
FC_FREE().
-jason
- [Freeciv-Dev] Re: (PR#15126) patch: fc_free macro,
Jason Short <=
- [Freeciv-Dev] (PR#15126) patch: fc_free macro, Christian Prochaska, 2006/01/10
- [Freeciv-Dev] Re: (PR#15126) patch: fc_free macro, Jason Short, 2006/01/10
- [Freeciv-Dev] (PR#15126) patch: fc_free macro, Christian Prochaska, 2006/01/10
- [Freeciv-Dev] Re: (PR#15126) patch: fc_free macro, Jason Short, 2006/01/10
- [Freeciv-Dev] (PR#15126) patch: fc_free macro, Christian Prochaska, 2006/01/11
- [Freeciv-Dev] Re: (PR#15126) patch: fc_free macro, Jason Short, 2006/01/11
- [Freeciv-Dev] (PR#15126) patch: fc_free macro, Christian Prochaska, 2006/01/11
- [Freeciv-Dev] Re: (PR#15126) patch: fc_free macro, Jason Short, 2006/01/11
- [Freeciv-Dev] (PR#15126) patch: fc_free macro, Christian Prochaska, 2006/01/11
|
|