[postgis-tickets] r15636 - address_standardizer fix initialization from incompatible pointer type for PostgreSQL >= 9.6
Regina Obe
lr at pcorp.us
Tue Sep 5 22:40:00 PDT 2017
Author: robe
Date: 2017-09-05 22:39:59 -0700 (Tue, 05 Sep 2017)
New Revision: 15636
Modified:
trunk/extensions/address_standardizer/std_pg_hash.c
Log:
address_standardizer fix initialization from incompatible pointer type for PostgreSQL >= 9.6
Closes #3830
Modified: trunk/extensions/address_standardizer/std_pg_hash.c
===================================================================
--- trunk/extensions/address_standardizer/std_pg_hash.c 2017-09-05 21:25:01 UTC (rev 15635)
+++ trunk/extensions/address_standardizer/std_pg_hash.c 2017-09-06 05:39:59 UTC (rev 15636)
@@ -14,7 +14,7 @@
/* standardizer headers */
#undef DEBUG
//#define DEBUG 1
-
+#include "../../postgis_config.h"
#include "pagc_api.h"
#include "pagc_std_api.h"
#include "std_pg_hash.h"
@@ -96,7 +96,13 @@
static void StdCacheReset(MemoryContext context);
static void StdCacheDelete(MemoryContext context);
static bool StdCacheIsEmpty(MemoryContext context);
+
+#if POSTGIS_PGSQL_VERSION >= 96
+static void StdCacheStats(MemoryContext context, int level, bool print, MemoryContextCounters *totals);
+#else
static void StdCacheStats(MemoryContext context, int level);
+#endif
+
#ifdef MEMORY_CONTEXT_CHECKING
static void StdCacheCheck(MemoryContext context);
#endif
@@ -180,19 +186,28 @@
}
+#if POSTGIS_PGSQL_VERSION >= 96
static void
+StdCacheStats(MemoryContext context, int level, bool print, MemoryContextCounters *totals)
+{
+ // another required function
+ fprintf(stderr, "%s: STANDARDIZER context\n", context->name);
+}
+#else
+static void
StdCacheStats(MemoryContext context, int level)
{
// another required function
fprintf(stderr, "%s: STANDARDIZER context\n", context->name);
}
+#endif
#ifdef MEMORY_CONTEXT_CHECKING
static void
StdCacheCheck(MemoryContext context)
{
- // NOP - another reuired function
+ // NOP - another required function
}
#endif
More information about the postgis-tickets
mailing list