diff options
author | Bruce Momjian <bruce@momjian.us> | 2003-03-25 02:44:36 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2003-03-25 02:44:36 +0000 |
commit | f1792b932c574eada6527a87e2489364f700fca4 (patch) | |
tree | 7e7d1f2ff809c2b0542110e68e5cbf5d88715310 /src/interfaces/libpq/fe-exec.c | |
parent | 6a19c6dccfee66df3970dfba15a8590fdd399bc1 (diff) | |
download | postgresql-f1792b932c574eada6527a87e2489364f700fca4.tar.gz postgresql-f1792b932c574eada6527a87e2489364f700fca4.zip |
Use PQfreemem() consistently, and document its use for Notify.
Keep PQfreeNotify() around for binary compatibility.
Diffstat (limited to 'src/interfaces/libpq/fe-exec.c')
-rw-r--r-- | src/interfaces/libpq/fe-exec.c | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c index 5b8a6d3ef04..9e86b3aa672 100644 --- a/src/interfaces/libpq/fe-exec.c +++ b/src/interfaces/libpq/fe-exec.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.127 2003/03/22 03:29:06 momjian Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.128 2003/03/25 02:44:36 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -1578,20 +1578,6 @@ PQnotifies(PGconn *conn) } /* - * PQfreeNotify - free's the memory associated with a PGnotify - * - * This function is needed on Windows when using libpq.dll and - * for example libpgtcl.dll: All memory allocated inside a dll - * should be freed in the context of the same dll. - * - */ -void -PQfreeNotify(PGnotify *notify) -{ - free(notify); -} - -/* * PQgetline - gets a newline-terminated string from the backend. * * Chiefly here so that applications can use "COPY <rel> to stdout" @@ -2470,3 +2456,22 @@ PQsendSome(PGconn *conn) { return pqSendSome(conn); } + +/* + * PQfreeNotify - free's the memory associated with a PGnotify + * + * This function is here only for binary backward compatibility. + * New code should use PQfreemem(). A macro will automatically map + * calls to PQfreemem. It should be removed in the future. bjm 2003-03-24 + */ + +#undef PQfreeNotify +void PQfreeNotify(PGnotify *notify); + +void +PQfreeNotify(PGnotify *notify) +{ + PQfreemem(notify); +} + + |