]> granicus.if.org Git - postgis/commitdiff
Added lwgeom_pg to contain PG-specific functions/interfaces.
authorSandro Santilli <strk@keybit.net>
Wed, 25 Aug 2004 07:28:28 +0000 (07:28 +0000)
committerSandro Santilli <strk@keybit.net>
Wed, 25 Aug 2004 07:28:28 +0000 (07:28 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@743 b70326c6-7e19-0410-871a-916f4a2858ee

lwgeom/Makefile
lwgeom/lwgeom_pg.c [new file with mode: 0644]
lwgeom/lwgeom_pg.h [new file with mode: 0644]

index 4b5081e4ff4efc5781f1044474020cf57bd9e37c..769fdda73bdb7b4a385a90fbfbda72d34dd62ccf 100644 (file)
@@ -132,7 +132,7 @@ ifeq ($(USE_STATS),1)
        override CFLAGS += -DUSE_STATS
 endif
  
-OBJS=lwgeom_api.o lwgeom_ogc.o lwgeom_functions_analytic.o lwgeom_geos.o lwgeom_inout.o lwgeom_estimate.o lwgeom_functions_basic.o lwgeom_gist.o lwgeom_btree.o lwgeom_transform.o stringBuffer.o lwgeom_box2dfloat4.o lex.yy.o wktparse.tab.o lwgparse.o wktunparse.o $(GEOS_WRAPPER)
+OBJS=lwgeom_pg.o lwgeom_api.o lwgeom_ogc.o lwgeom_functions_analytic.o lwgeom_geos.o lwgeom_inout.o lwgeom_estimate.o lwgeom_functions_basic.o lwgeom_gist.o lwgeom_btree.o lwgeom_transform.o stringBuffer.o lwgeom_box2dfloat4.o lex.yy.o wktparse.tab.o lwgparse.o wktunparse.o $(GEOS_WRAPPER)
 
 OTHERS=y.output lex.yy.c wktparse.tab.c wktparse.tab.h lwgeom.sql lwpostgis.sql
 
diff --git a/lwgeom/lwgeom_pg.c b/lwgeom/lwgeom_pg.c
new file mode 100644 (file)
index 0000000..792a7ab
--- /dev/null
@@ -0,0 +1,15 @@
+#include "postgres.h"
+
+void *palloc_fn(size_t size)
+{
+       void * result;
+       result = palloc(size);
+       //elog(NOTICE,"  palloc(%d) = %p", size, result);
+       return result;
+}
+
+void free_fn(void *ptr)
+{
+       //elog(NOTICE,"  pfree(%p)", ptr);
+       pfree(ptr);
+}
diff --git a/lwgeom/lwgeom_pg.h b/lwgeom/lwgeom_pg.h
new file mode 100644 (file)
index 0000000..b95e738
--- /dev/null
@@ -0,0 +1,3 @@
+void *palloc_fn(size_t size);
+void free_fn(void *ptr);
+