Changeset: 1266171dc98e for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/1266171dc98e Modified Files: monetdb5/mal/mal_scenario.c monetdb5/mal/mal_session.c sql/backends/monet5/sql_scenario.c sql/backends/monet5/sql_scenario.h Branch: default Log Message:
Add a cast, use const char *, use designators in struct initialization. diffs (118 lines): diff --git a/monetdb5/mal/mal_scenario.c b/monetdb5/mal/mal_scenario.c --- a/monetdb5/mal/mal_scenario.c +++ b/monetdb5/mal/mal_scenario.c @@ -106,29 +106,26 @@ #endif static struct SCENARIO scenarioRec[MAXSCEN] = { - {"mal", "mal", - 0, 0, /* hardwired MALinit*/ - 0, 0, /* implicit */ - "MALinitClient", (MALfcn) &MALinitClient, - "MALexitClient", (MALfcn) &MALexitClient, - "MALreader", (MALfcn) &MALreader, - "MALparser", (MALfcn) &MALparser, - "MALoptimizer", 0, - 0, 0, - "MALengine", (MALfcn) &MALengine, - "MALcallback", (MALfcn) &MALcallback }, - {0, 0, /* name */ - 0, 0, /* init */ - 0, 0, /* exit */ - 0, 0, /* initClient */ - 0, 0, /* exitClient */ - 0, 0, /* reader */ - 0, 0, /* parser */ - 0, 0, /* optimizer */ - 0, 0, /* scheduler */ - 0, 0, /* callback */ - 0, 0 /* engine */ - } + { .name = "mal", + .language = "mal", + .initClient = "MALinitClient", + .initClientCmd = (MALfcn) MALinitClient, + .exitClient = "MALexitClient", + .exitClientCmd = (MALfcn) MALexitClient, + .reader = "MALreader", + .readerCmd = (MALfcn) MALreader, + .parser = "MALparser", + .parserCmd = (MALfcn) MALparser, + .optimizer = "MALoptimizer", + .optimizerCmd = NULL, + .engine = "MALengine", + .engineCmd = (MALfcn) MALengine, + .callback = "MALcallback", + .callbackCmd = (MALfcn) MALcallback, + }, + { + .name = NULL, + } }; static str fillScenario(Client c, Scenario scen); diff --git a/monetdb5/mal/mal_session.c b/monetdb5/mal/mal_session.c --- a/monetdb5/mal/mal_session.c +++ b/monetdb5/mal/mal_session.c @@ -412,7 +412,7 @@ MSscheduleClient(str command, str challe c->blocksize = blocksize; if (!GDKembedded() && c->phase[MAL_SCENARIO_INITCLIENT]) { - str (*init_client)(Client c, str passwd, str challenge, str algo) = c->phase[MAL_SCENARIO_INITCLIENT]; + str (*init_client)(Client, const char *, const char *, const char *) = (str (*)(Client, const char *, const char *, const char *)) c->phase[MAL_SCENARIO_INITCLIENT]; if ((msg = init_client(c, passwd, challenge, algo)) != MAL_SUCCEED) { mnstr_printf(fout, "!%s\n", msg); if (passwd) diff --git a/sql/backends/monet5/sql_scenario.c b/sql/backends/monet5/sql_scenario.c --- a/sql/backends/monet5/sql_scenario.c +++ b/sql/backends/monet5/sql_scenario.c @@ -310,7 +310,7 @@ SQLexecPostLoginTriggers(Client c) } static str -userCheckCredentials( mvc *m, Client c, str pwhash, str challenge, str algo) +userCheckCredentials( mvc *m, Client c, const char *pwhash, const char *challenge, const char *algo) { oid uid = getUserOIDByName(m, c->username); @@ -365,7 +365,7 @@ userCheckCredentials( mvc *m, Client c, } static char* -SQLprepareClient(Client c, str pwhash, str challenge, str algo) +SQLprepareClient(Client c, const char *pwhash, const char *challenge, const char *algo) { mvc *m = NULL; backend *be = NULL; @@ -828,7 +828,7 @@ SQLtrans(mvc *m) } str -SQLinitClient(Client c, str passwd, str challenge, str algo) +SQLinitClient(Client c, const char *passwd, const char *challenge, const char *algo) { str msg = MAL_SUCCEED; @@ -848,7 +848,7 @@ SQLinitClient(Client c, str passwd, str } str -SQLinitClientFromMAL(Client c, str passwd, str challenge, str algo) +SQLinitClientFromMAL(Client c, const char *passwd, const char *challenge, const char *algo) { str msg = MAL_SUCCEED; diff --git a/sql/backends/monet5/sql_scenario.h b/sql/backends/monet5/sql_scenario.h --- a/sql/backends/monet5/sql_scenario.h +++ b/sql/backends/monet5/sql_scenario.h @@ -22,8 +22,8 @@ sql5_export str SQLtrans(mvc *m); sql5_export str SQLexit(Client c); sql5_export str SQLexitClient(Client c); sql5_export str SQLresetClient(Client c); -sql5_export str SQLinitClient(Client c, str passwd, str challenge, str algo); -sql5_export str SQLinitClientFromMAL(Client c, str passwd, str challenge, str algo); +sql5_export str SQLinitClient(Client c, const char *passwd, const char *challenge, const char *algo); +sql5_export str SQLinitClientFromMAL(Client c, const char *passwd, const char *challenge, const char *algo); sql5_export str SQLreader(Client c); sql5_export str SQLparser(Client c); sql5_export str SQLengine(Client c); _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org