[Groonga-commit] pgroonga/pgroonga at be3c911 [master] Split grn_ctx

Back to archive index

Kouhei Sutou null+****@clear*****
Sat Jan 23 22:48:49 JST 2016


Kouhei Sutou	2016-01-23 22:48:49 +0900 (Sat, 23 Jan 2016)

  New Revision: be3c911d720e5771811409ff7a029e50b91d2ccd
  https://github.com/pgroonga/pgroonga/commit/be3c911d720e5771811409ff7a029e50b91d2ccd

  Message:
    Split grn_ctx

  Added files:
    src/pgrn_global.h
  Modified files:
    src/pgroonga.c

  Added: src/pgrn_global.h (+5 -0) 100644
===================================================================
--- /dev/null
+++ src/pgrn_global.h    2016-01-23 22:48:49 +0900 (cee89ed)
@@ -0,0 +1,5 @@
+#pragma once
+
+#include <groonga.h>
+
+grn_ctx PGrnContext;

  Modified: src/pgroonga.c (+3 -3)
===================================================================
--- src/pgroonga.c    2016-01-23 22:29:12 +0900 (e478742)
+++ src/pgroonga.c    2016-01-23 22:48:49 +0900 (42898c5)
@@ -230,7 +230,7 @@ PG_FUNCTION_INFO_V1(pgroonga_canreturn);
 PG_FUNCTION_INFO_V1(pgroonga_costestimate);
 PG_FUNCTION_INFO_V1(pgroonga_options);
 
-static grn_ctx grnContext;
+grn_ctx PGrnContext;
 static grn_ctx *ctx = NULL;
 static grn_obj buffer;
 static grn_obj pathBuffer;
@@ -681,12 +681,12 @@ _PG_init(void)
 
 	on_proc_exit(PGrnOnProcExit, 0);
 
-	if (grn_ctx_init(&grnContext, 0))
+	if (grn_ctx_init(&PGrnContext, 0))
 		ereport(ERROR,
 				(errcode(ERRCODE_SYSTEM_ERROR),
 				 errmsg("pgroonga: failed to initialize Groonga context")));
 
-	ctx = &grnContext;
+	ctx = &PGrnContext;
 
 	GRN_VOID_INIT(&buffer);
 	GRN_TEXT_INIT(&pathBuffer, 0);
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index