mirror of
https://github.com/postgres/postgres.git
synced 2025-11-24 00:23:06 +03:00
Add PQfreemem() call for Win32.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* 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 $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -284,6 +284,19 @@ PQunescapeBytea(const unsigned char *strtext, size_t *retbuflen)
|
||||
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.
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* 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 $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -254,6 +254,7 @@ extern unsigned char *PQescapeBytea(const unsigned char *bintext, size_t binlen,
|
||||
size_t *bytealen);
|
||||
extern unsigned char *PQunescapeBytea(const unsigned char *strtext,
|
||||
size_t *retbuflen);
|
||||
extern void PQfreemem(void *ptr);
|
||||
|
||||
|
||||
/* Simple synchronous query */
|
||||
|
||||
Reference in New Issue
Block a user