Changeset: 87f38df2b46b for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=87f38df2b46b
Modified Files:
monetdb5/mal/mal_parser.c
Branch: Dec2016
Log Message:
Prevent the loading of the Python UDF Library when it is disabled.
diffs (30 lines):
diff --git a/monetdb5/mal/mal_parser.c b/monetdb5/mal/mal_parser.c
--- a/monetdb5/mal/mal_parser.c
+++ b/monetdb5/mal/mal_parser.c
@@ -949,6 +949,15 @@ static str parseModule(Client cntxt)
return "";
}
+
+static int
+malLibraryEnabled(str name) {
+ if (strcmp(name, "pyapi") == 0) {
+ return GDKgetenv_istrue("embedded_py") ||
GDKgetenv_isyes("embedded_py");
+ }
+ return 1;
+}
+
/*
* Include statement
* An include statement is immediately taken into effect. This
@@ -995,6 +1004,10 @@ parseInclude(Client cntxt)
}
skipToEnd(cntxt);
+ if (!malLibraryEnabled(modnme)) {
+ return "";
+ }
+
s = loadLibrary(modnme, FALSE);
if (s) {
parseError(cntxt, s);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list