Permalink
Browse files

Fix 'make test' and add a _PG_init

  • Loading branch information...
1 parent 0a73291 commit f960f209f49a513ddfc752f7d0cf153393945775 @leto committed Jan 29, 2010
Showing with 13 additions and 1 deletion.
  1. +1 −1 Makefile
  2. +12 −0 src/handler/plparrot.c
View
@@ -36,5 +36,5 @@ PARROTLINKFLAGS = $(shell parrot_config inst_libparrot_linkflags)
override CPPFLAGS := -I$(PARROTINC) -I$(srcdir) $(CPPFLAGS)
override CFLAGS := $(PARROTLDFLAGS) $(PARROTLINKFLAGS) $(CFLAGS)
-test:
+test: all
pg_prove --pset tuples_only=1 $(TESTS)
View
@@ -16,6 +16,18 @@
PG_MODULE_MAGIC;
int execq(text *sql, int cnt);
+void
+_PG_init(void)
+{
+ /* Be sure we do initialization only once */
+ static bool inited = false;
+
+ if (inited)
+ return;
+
+ inited = true;
+}
+
int
execq(text *sql, int cnt)
{

0 comments on commit f960f20

Please sign in to comment.