1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-01 12:18:01 +03:00

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
This commit is contained in:
Thomas Munro
2018-06-18 18:33:53 +12:00
parent c4ccbcc1a2
commit db05d0b906
20 changed files with 192 additions and 139 deletions

View File

@@ -28,6 +28,8 @@
#ifndef PGTYPES_NUMERIC
#define PGTYPES_NUMERIC
#include <pgtypes.h>
#define NUMERIC_POS 0x0000
#define NUMERIC_NEG 0x4000
#define NUMERIC_NAN 0xC000