From: teodor <teodor>
Date: Wed, 23 Aug 2006 09:13:16 +0000 (+0000)
Subject: fix ginstentryinit() macro for 8.2
X-Git-Url: http://sigaev.ru/git/gitweb.cgi?a=commitdiff_plain;h=8ab5cf9bc5af5d77432c151196bc35347c849996;p=hstore.git

fix ginstentryinit() macro for 8.2
---

diff --git a/hstore_gist.c b/hstore_gist.c
index f6ecc78..cb9cfae 100644
--- a/hstore_gist.c
+++ b/hstore_gist.c
@@ -137,7 +137,11 @@ ghstore_compress(PG_FUNCTION_ARGS) {
 		retval = (GISTENTRY *) palloc(sizeof(GISTENTRY));
 		gistentryinit(*retval, PointerGetDatum(res),
 					  entry->rel, entry->page,
-					  entry->offset, res->len, FALSE);
+					  entry->offset,
+#ifndef PG_MODULE_MAGIC
+					  res->len,
+#endif
+					  FALSE);
 	} else if ( !ISALLTRUE(DatumGetPointer(entry->key)) ) {
 		int4	    i;
 		GISTTYPE   *res;
@@ -155,7 +159,11 @@ ghstore_compress(PG_FUNCTION_ARGS) {
 		retval = (GISTENTRY *) palloc(sizeof(GISTENTRY));
 		gistentryinit(*retval, PointerGetDatum(res),
 					  entry->rel, entry->page,
-					  entry->offset, res->len, FALSE);
+					  entry->offset, 
+#ifndef PG_MODULE_MAGIC
+					  res->len,
+#endif
+					  FALSE);
 	}
 
 	PG_RETURN_POINTER(retval);