+
+
+ PQfreemem
+
+ Frees memory allocated by
libpq>
+
+void PQfreemem(void *ptr);
+
+
+
+ Frees memory allocated by
libpq>, particularly
+ PQescapeBytea and PQunescapeBytea.
+ It is needed by Win32, which can not free memory across
+ DLL's, unless multithreaded DLL's (/MD in VC6) are used.
+
+
+
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.126 2003/03/10 22:28:21 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.127 2003/03/22 03:29:06 momjian Exp $
*
*-------------------------------------------------------------------------
*/
return buffer;
}
+
+/*
+ * PQfreemem - safely frees memory allocated
+ *
+ * Needed mostly by Win32, unless multithreaded DLL (/MD in VC6)
+ * Used for freeing memory from PQescapeByte()a/PQunescapeBytea()
+ */
+void PQfreemem(void *ptr)
+{
+ free(ptr);
+}
+
+
/* ----------------
* Space management for PGresult.
*
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: libpq-fe.h,v 1.89 2003/03/20 06:23:30 momjian Exp $
+ * $Id: libpq-fe.h,v 1.90 2003/03/22 03:29:06 momjian Exp $
*
*-------------------------------------------------------------------------
*/
size_t *bytealen);
extern unsigned char *PQunescapeBytea(const unsigned char *strtext,
size_t *retbuflen);
+extern void PQfreemem(void *ptr);
/* Simple synchronous query */