[Groonga-commit] groonga/groonga at 5f00767 [master] Extract grn_db_* API

Zurück zum Archiv-Index

Kouhei Sutou null+****@clear*****
Wed May 11 09:57:51 JST 2016


Kouhei Sutou	2016-05-11 09:57:51 +0900 (Wed, 11 May 2016)

  New Revision: 5f007678f4f3b7d179b93d6f24da944f4ccd262e
  https://github.com/groonga/groonga/commit/5f007678f4f3b7d179b93d6f24da944f4ccd262e

  Message:
    Extract grn_db_* API

  Copied files:
    include/groonga/db.h
      (from include/groonga.h)
  Modified files:
    include/groonga.h
    include/groonga/Makefile.am
    include/groonga/groonga.h

  Modified: include/groonga.h (+1 -0)
===================================================================
--- include/groonga.h    2016-05-10 23:22:24 +0900 (229c275)
+++ include/groonga.h    2016-05-11 09:57:51 +0900 (5de51be)
@@ -24,6 +24,7 @@
 #include "groonga/array.h"
 #include "groonga/config.h"
 #include "groonga/dat.h"
+#include "groonga/db.h"
 #include "groonga/dump.h"
 #include "groonga/expr.h"
 #include "groonga/file_reader.h"

  Modified: include/groonga/Makefile.am (+1 -0)
===================================================================
--- include/groonga/Makefile.am    2016-05-10 23:22:24 +0900 (35834fc)
+++ include/groonga/Makefile.am    2016-05-11 09:57:51 +0900 (9c0e351)
@@ -4,6 +4,7 @@ groonga_include_HEADERS =			\
 	command.h				\
 	config.h				\
 	dat.h					\
+	db.h					\
 	dump.h					\
 	expr.h					\
 	file_reader.h				\

  Copied: include/groonga/db.h (+25 -24) 50%
===================================================================
--- include/groonga.h    2016-05-10 23:22:24 +0900 (229c275)
+++ include/groonga/db.h    2016-05-11 09:57:51 +0900 (67eb232)
@@ -1,5 +1,5 @@
 /*
-  Copyright(C) 2014-2016 Brazil
+  Copyright(C) 2009-2016 Brazil
 
   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
@@ -18,26 +18,27 @@
 
 #pragma once
 
-#include "groonga/portability.h"
-#include "groonga/groonga.h"
-
-#include "groonga/array.h"
-#include "groonga/config.h"
-#include "groonga/dat.h"
-#include "groonga/dump.h"
-#include "groonga/expr.h"
-#include "groonga/file_reader.h"
-#include "groonga/geo.h"
-#include "groonga/hash.h"
-#include "groonga/ii.h"
-#include "groonga/obj.h"
-#include "groonga/output.h"
-#include "groonga/pat.h"
-#include "groonga/request_canceler.h"
-#include "groonga/request_timer.h"
-#include "groonga/thread.h"
-#include "groonga/time.h"
-#include "groonga/type.h"
-#include "groonga/util.h"
-#include "groonga/windows.h"
-#include "groonga/windows_event_logger.h"
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
+typedef struct _grn_db_create_optarg grn_db_create_optarg;
+
+struct _grn_db_create_optarg {
+  char **builtin_type_names;
+  int n_builtin_type_names;
+};
+
+GRN_API grn_obj *grn_db_create(grn_ctx *ctx, const char *path, grn_db_create_optarg *optarg);
+
+#define GRN_DB_OPEN_OR_CREATE(ctx,path,optarg,db) \
+  (((db) = grn_db_open((ctx), (path))) || (db = grn_db_create((ctx), (path), (optarg))))
+
+GRN_API grn_obj *grn_db_open(grn_ctx *ctx, const char *path);
+GRN_API void grn_db_touch(grn_ctx *ctx, grn_obj *db);
+GRN_API grn_rc grn_db_recover(grn_ctx *ctx, grn_obj *db);
+GRN_API grn_rc grn_db_unmap(grn_ctx *ctx, grn_obj *db);
+
+#ifdef __cplusplus
+}
+#endif

  Modified: include/groonga/groonga.h (+0 -17)
===================================================================
--- include/groonga/groonga.h    2016-05-10 23:22:24 +0900 (9a06a79)
+++ include/groonga/groonga.h    2016-05-11 09:57:51 +0900 (a32d83b)
@@ -437,23 +437,6 @@ struct _grn_obj {
 
 #define GRN_OBJ_FIN(ctx,obj) (grn_obj_close((ctx), (obj)))
 
-typedef struct _grn_db_create_optarg grn_db_create_optarg;
-
-struct _grn_db_create_optarg {
-  char **builtin_type_names;
-  int n_builtin_type_names;
-};
-
-GRN_API grn_obj *grn_db_create(grn_ctx *ctx, const char *path, grn_db_create_optarg *optarg);
-
-#define GRN_DB_OPEN_OR_CREATE(ctx,path,optarg,db) \
-  (((db) = grn_db_open((ctx), (path))) || (db = grn_db_create((ctx), (path), (optarg))))
-
-GRN_API grn_obj *grn_db_open(grn_ctx *ctx, const char *path);
-GRN_API void grn_db_touch(grn_ctx *ctx, grn_obj *db);
-GRN_API grn_rc grn_db_recover(grn_ctx *ctx, grn_obj *db);
-GRN_API grn_rc grn_db_unmap(grn_ctx *ctx, grn_obj *db);
-
 GRN_API grn_rc grn_ctx_use(grn_ctx *ctx, grn_obj *db);
 GRN_API grn_obj *grn_ctx_db(grn_ctx *ctx);
 GRN_API grn_obj *grn_ctx_get(grn_ctx *ctx, const char *name, int name_size);
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Zurück zum Archiv-Index