Navigation Menu

Skip to content

Commit

Permalink
change signature of mrn_init/mrn_deinit. add mrn_plugin_deinit.
Browse files Browse the repository at this point in the history
  • Loading branch information
ikdttr committed Jun 18, 2009
1 parent c0876d1 commit beaf8e9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions driver.c
Expand Up @@ -41,7 +41,7 @@ int mrn_flush_logs()
return 0;
}

int mrn_init(void *p)
int mrn_init()
{
/* libgroonga init */
grn_init();
Expand Down Expand Up @@ -72,7 +72,7 @@ int mrn_init(void *p)
/*
TODO: release all grn_obj in global hash
*/
int mrn_deinit(void *p)
int mrn_deinit()
{
mrn_ctx_init();
MRN_TRACE;
Expand Down
4 changes: 2 additions & 2 deletions driver.h
Expand Up @@ -64,8 +64,8 @@ typedef struct _mrn_share {
snprintf(buf,MRN_MAX_KEY_LEN-1, "%s/%s.%s%s", db, table, column, MRN_FILE_EXT)

/* functions */
int mrn_init(void *p);
int mrn_deinit(void *p);
int mrn_init();
int mrn_deinit();
void mrn_logger_func(int level, const char *time, const char *title,
const char *msg, const char *location, void *func_arg);
int mrn_flush_logs();
Expand Down
9 changes: 7 additions & 2 deletions ha_groonga.cc
Expand Up @@ -91,7 +91,12 @@ int mrn_plugin_init(void *p)
hton->create = mrn_handler_create;
hton->flush_logs = mrn_plugin_flush_logs;
hton->flags = 0;
mrn_init(NULL);
return mrn_init();
}

int mrn_plugin_deinit(void *p)
{
return mrn_deinit();
}


Expand All @@ -107,7 +112,7 @@ mysql_declare_plugin(mroonga)
"MySQL binding for Groonga",
PLUGIN_LICENSE_BSD,
mrn_plugin_init,
mrn_deinit,
mrn_plugin_deinit,
0x0001,
NULL,
NULL,
Expand Down

0 comments on commit beaf8e9

Please sign in to comment.