[postgis-tickets] r16168 - if def out GetPJHashEntry for >-96 when we are using PostgreSQL built-in context. We don't use it cause it returns projection, not the HashEntry grrh.

Regina Obe lr at pcorp.us
Wed Dec 20 08:18:57 PST 2017


Author: robe
Date: 2017-12-20 08:18:57 -0800 (Wed, 20 Dec 2017)
New Revision: 16168

Modified:
   trunk/libpgcommon/lwgeom_transform.c
Log:
if def out GetPJHashEntry for >-96  when we are using PostgreSQL built-in context.  We don't use it cause it returns projection, not the HashEntry grrh.
Take it out to quiet travis whining about how we define a function we are not using.
References #3946

Modified: trunk/libpgcommon/lwgeom_transform.c
===================================================================
--- trunk/libpgcommon/lwgeom_transform.c	2017-12-20 15:20:22 UTC (rev 16167)
+++ trunk/libpgcommon/lwgeom_transform.c	2017-12-20 16:18:57 UTC (rev 16168)
@@ -76,7 +76,10 @@
 
 static HTAB *CreatePJHash(void);
 static void AddPJHashEntry(MemoryContext mcxt, projPJ projection);
+#if POSTGIS_PGSQL_VERSION < 96
+/** see note on function def why this is useless **/
 static projPJ GetPJHashEntry(MemoryContext mcxt);
+#endif
 static void DeletePJHashEntry(MemoryContext mcxt);
 
 /* Internal Cache API */
@@ -265,6 +268,11 @@
 	}
 }
 
+/** TODO: May reconsider changing this to return entry as name implies
+ *  For now it's useless when we are using built-in context cause
+ * we need the entry for cleanup
+ * */
+#if POSTGIS_PGSQL_VERSION < 96
 static projPJ GetPJHashEntry(MemoryContext mcxt)
 {
 	void **key;
@@ -278,8 +286,8 @@
 
 	return he->projection;
 }
+#endif
 
-
 static void DeletePJHashEntry(MemoryContext mcxt)
 {
 	void **key;



More information about the postgis-tickets mailing list