On Tue, Dec 11, 2012 at 12:43 PM, Josh Kupershmidt <schmiddy(at)gmail(dot)com> wrote:
> Ah, well. I guess using a macro like:
>
> #define SafeClear(res) do {PQclear(res); res = NULL;} while (0);
>
> will suffice for me.
Psycopg uses:
#define IFCLEARPGRES(pgres) if (pgres) {PQclear(pgres); pgres = NULL;}
-- Daniele