Changeset: 00f28fedda60 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=00f28fedda60
Added Files:
sql/backends/monet5/UDF/pyapi3/conversion3.c
sql/backends/monet5/UDF/pyapi3/emit3.c
sql/backends/monet5/UDF/pyapi3/pyloader3.c
Modified Files:
monetdb5/mal/mal_parser.c
Branch: python3udf
Log Message:
Missing files.
diffs (51 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
@@ -953,10 +953,11 @@ static str parseModule(Client cntxt)
// returns the currently enabled python version, if any
// defaults to python 2 if none is enabled
static int
-enabled_python_version() {
+enabled_python_version(void) {
char* env = GDKgetenv(pyapi_enableflag);
- if (env && strncmp(env, "3", 1) == 0)
- return 3;
+ if (env && strncmp(env, "3", 1) == 0) {
+ return 3;
+ }
return 2;
}
diff --git a/sql/backends/monet5/UDF/pyapi3/conversion3.c
b/sql/backends/monet5/UDF/pyapi3/conversion3.c
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/UDF/pyapi3/conversion3.c
@@ -0,0 +1,6 @@
+
+/* Python 3 UDFs use the exact same source code as Python 2 UDFs */
+/* Except they are linked to a different library (Python 3/Python 2 libraries
respectively) */
+/* We simply include the source code from the Python 2 UDF directory */
+
+#include "conversion.c"
diff --git a/sql/backends/monet5/UDF/pyapi3/emit3.c
b/sql/backends/monet5/UDF/pyapi3/emit3.c
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/UDF/pyapi3/emit3.c
@@ -0,0 +1,6 @@
+
+/* Python 3 UDFs use the exact same source code as Python 2 UDFs */
+/* Except they are linked to a different library (Python 3/Python 2 libraries
respectively) */
+/* We simply include the source code from the Python 2 UDF directory */
+
+#include "emit.c"
diff --git a/sql/backends/monet5/UDF/pyapi3/pyloader3.c
b/sql/backends/monet5/UDF/pyapi3/pyloader3.c
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/UDF/pyapi3/pyloader3.c
@@ -0,0 +1,6 @@
+
+/* Python 3 UDFs use the exact same source code as Python 2 UDFs */
+/* Except they are linked to a different library (Python 3/Python 2 libraries
respectively) */
+/* We simply include the source code from the Python 2 UDF directory */
+
+#include "pyloader.c"
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list