Changeset: 1f26dfed60d4 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1f26dfed60d4
Modified Files:
clients/mapilib/mapi.c
clients/mapilib/mapi.h
Branch: default
Log Message:
Removed internal definitions LANG_* from mapi.h.
And changed them to enum.
diffs (49 lines):
diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c
--- a/clients/mapilib/mapi.c
+++ b/clients/mapilib/mapi.c
@@ -826,6 +826,12 @@ struct BlockCache {
int eos; /* end of sequence */
};
+enum mapi_lang_t {
+ LANG_MAL = 0,
+ LANG_SQL = 2,
+ LANG_PROFILER = 3
+};
+
/* A connection to a server is represented by a struct MapiStruct. An
application can have any number of connections to any number of
servers. Connections are completely independent of each other.
@@ -840,7 +846,7 @@ struct MapiStruct {
char *language;
char *database; /* to obtain from server */
char *uri;
- int languageId;
+ enum mapi_lang_t languageId;
char *motd; /* welcome message from server */
char *noexplain; /* on error, don't explain, only print result */
@@ -1405,6 +1411,9 @@ mapi_ping(Mapi mid)
break;
case LANG_MAL:
hdl = mapi_query(mid, "io.print(1);");
+ break;
+ default:
+ break;
}
if (hdl)
mapi_close_handle(hdl);
diff --git a/clients/mapilib/mapi.h b/clients/mapilib/mapi.h
--- a/clients/mapilib/mapi.h
+++ b/clients/mapilib/mapi.h
@@ -47,10 +47,6 @@ typedef int MapiMsg;
#define MMORE (-3)
#define MSERVER (-4)
-#define LANG_MAL 0
-#define LANG_SQL 2
-#define LANG_PROFILER 3
-
/* prompts for MAPI protocol, also in monetdb_config.h.in */
#define PROMPTBEG '\001' /* start prompt bracket */
#define PROMPT1 "\001\001\n" /* prompt: ready for new query
*/
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list