]> granicus.if.org Git - postgresql/commit
Add PGTYPESchar_free() to avoid cross-module problems on Windows.
authorThomas Munro <tmunro@postgresql.org>
Mon, 18 Jun 2018 06:33:53 +0000 (18:33 +1200)
committerThomas Munro <tmunro@postgresql.org>
Tue, 26 Jun 2018 08:54:09 +0000 (20:54 +1200)
commitb5b973ef0ba736c7c002f0907014d3115471644e
tree1f6beed277e2698944984f81ab9d09d2fcc4102d
parent35750a38b7ab6e30aa2ee6eb7765ebd2172dd7c5
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
20 files changed:
doc/src/sgml/ecpg.sgml
src/interfaces/ecpg/include/Makefile
src/interfaces/ecpg/include/pgtypes.h [new file with mode: 0644]
src/interfaces/ecpg/include/pgtypes_date.h
src/interfaces/ecpg/include/pgtypes_interval.h
src/interfaces/ecpg/include/pgtypes_numeric.h
src/interfaces/ecpg/include/pgtypes_timestamp.h
src/interfaces/ecpg/pgtypeslib/common.c
src/interfaces/ecpg/pgtypeslib/exports.txt
src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c
src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c
src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c
src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c
src/interfaces/ecpg/test/expected/preproc-outofscope.c
src/interfaces/ecpg/test/expected/sql-sqlda.c
src/interfaces/ecpg/test/pgtypeslib/dt_test.pgc
src/interfaces/ecpg/test/pgtypeslib/dt_test2.pgc
src/interfaces/ecpg/test/pgtypeslib/num_test.pgc
src/interfaces/ecpg/test/pgtypeslib/num_test2.pgc
src/interfaces/ecpg/test/sql/sqlda.pgc