pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add PGTYPESchar_free() to avoid cross-module problems on Windows
Date: Tue, 26 Jun 2018 11:59:52 +0000
Message-ID: <E1fXmdU-0002Bg-J4@gemulon.postgresql.org> (raw)

Add PGTYPESchar_free() to avoid cross-module problems on Windows.

On Windows, it is sometimes important for corresponding malloc() and
free() calls to be made from the same DLL, since some build options can
result in multiple allocators being active at the same time.  For that
reason we already provided PQfreemem().  This commit adds a similar
function for freeing string results allocated by the pgtypes library.

Author: Takayuki Tsunakawa
Reviewed-by: Kyotaro Horiguchi
Discussion: https://postgr.es/m/0A3221C70F24FB45833433255569204D1F8AD5D6%40G01JPEXMBYT05

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/3bc19d0d263c32c225a391e5275d6ba24dbc423c

Modified Files
--------------
doc/src/sgml/ecpg.sgml                             | 24 +++++--
src/interfaces/ecpg/include/Makefile               |  2 +-
src/interfaces/ecpg/include/pgtypes.h              | 17 +++++
src/interfaces/ecpg/include/pgtypes_date.h         |  1 +
src/interfaces/ecpg/include/pgtypes_interval.h     |  1 +
src/interfaces/ecpg/include/pgtypes_numeric.h      |  2 +
src/interfaces/ecpg/include/pgtypes_timestamp.h    |  1 +
src/interfaces/ecpg/pgtypeslib/common.c            | 10 +++
src/interfaces/ecpg/pgtypeslib/exports.txt         |  1 +
.../ecpg/test/expected/pgtypeslib-dt_test.c        | 84 +++++++++++-----------
.../ecpg/test/expected/pgtypeslib-dt_test2.c       | 12 ++--
.../ecpg/test/expected/pgtypeslib-num_test.c       | 10 +--
.../ecpg/test/expected/pgtypeslib-num_test2.c      | 26 +++----
.../ecpg/test/expected/preproc-outofscope.c        |  2 +
src/interfaces/ecpg/test/expected/sql-sqlda.c      |  4 +-
src/interfaces/ecpg/test/pgtypeslib/dt_test.pgc    | 84 +++++++++++-----------
src/interfaces/ecpg/test/pgtypeslib/dt_test2.pgc   | 12 ++--
src/interfaces/ecpg/test/pgtypeslib/num_test.pgc   | 10 +--
src/interfaces/ecpg/test/pgtypeslib/num_test2.pgc  | 26 +++----
src/interfaces/ecpg/test/sql/sqlda.pgc             |  2 +-
20 files changed, 192 insertions(+), 139 deletions(-)



view thread (6+ messages)  latest in thread

Message-ID: <E1fXmdU-0002Bg-J4@gemulon.postgresql.org>
Permalink:  ../E1fXmdU-0002Bg-J4@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1fXmdU-0002Bg-J4@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tmunro@postgresql.org
  Subject: Re: pgsql: Add PGTYPESchar_free() to avoid cross-module problems on Windows
  In-Reply-To: <E1fXmdU-0002Bg-J4@gemulon.postgresql.org>
  References: <E1fXmdU-0002Bg-J4@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox