Changeset: a57eb8b181da for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a57eb8b181da
Modified Files:
        monetdb5/extras/pyapi/Tests/pyapi00.malC
        monetdb5/extras/pyapi/pyapi.c
        monetdb5/extras/pyapi/pyapi.h
Branch: pyapi
Log Message:

Python Integration: mc


diffs (62 lines):

diff --git a/monetdb5/extras/pyapi/Tests/pyapi00.malC 
b/monetdb5/extras/pyapi/Tests/pyapi00.malC
--- a/monetdb5/extras/pyapi/Tests/pyapi00.malC
+++ b/monetdb5/extras/pyapi/Tests/pyapi00.malC
@@ -12,7 +12,7 @@ bat.append(b,1189641421);
 
 io.print(b);
 
-r:bat[:oid,:dbl] := pyapi.eval(nil:ptr,"print(arg1);someval <- Re(fft(arg1)); 
print(someval); return(someval);",b);
+r:bat[:oid,:dbl] := pyapi.eval(nil:ptr,"This string is somehow not arriving at 
the C function, why?",b);
 io.print(r);
 
 
diff --git a/monetdb5/extras/pyapi/pyapi.c b/monetdb5/extras/pyapi/pyapi.c
--- a/monetdb5/extras/pyapi/pyapi.c
+++ b/monetdb5/extras/pyapi/pyapi.c
@@ -36,18 +36,21 @@ static int pyapiInitialized = FALSE;
 
 #define _PYAPI_DEBUG_
 
+str PyAPIeval(MalBlkPtr mb, MalStkPtr stk, InstrPtr pci, bit grouped);
 
 pyapi_export str PyAPIevalStd(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
                                                        InstrPtr pci) {
-       return PyAPIeval(cntxt, mb, stk, pci, 0);
+       (void) cntxt;
+       return PyAPIeval(mb, stk, pci, 0);
 }
 pyapi_export str PyAPIevalAggr(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
                                                         InstrPtr pci) {
-       return PyAPIeval(cntxt, mb, stk, pci, 1);
+       (void) cntxt;
+       return PyAPIeval(mb, stk, pci, 1);
 }
 
 
-str PyAPIeval(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci, bit 
grouped) {
+str PyAPIeval(MalBlkPtr mb, MalStkPtr stk, InstrPtr pci, bit grouped) {
        sql_func * sqlfun = *(sql_func**) getArgReference(stk, pci, pci->retc);
        str exprStr = *getArgReference_str(stk, pci, pci->retc + 1);
 
@@ -68,9 +71,6 @@ str PyAPIeval(Client cntxt, MalBlkPtr mb
        int seengrp = FALSE;
        PyObject *pArgs; // this is going to be the parameter tuple
 
-       // we don't need no context, but the compiler needs us to touch it (...)
-       (void) cntxt;
-
        if (!PyAPIEnabled()) {
                throw(MAL, "pyapi.eval",
                          "Embedded Python has not been enabled. Start server 
with --set %s=true",
diff --git a/monetdb5/extras/pyapi/pyapi.h b/monetdb5/extras/pyapi/pyapi.h
--- a/monetdb5/extras/pyapi/pyapi.h
+++ b/monetdb5/extras/pyapi/pyapi.h
@@ -19,8 +19,6 @@
 
 #define pyapi_export extern
 
-pyapi_export str PyAPIeval(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
-               InstrPtr pci, bit grouped);
 pyapi_export str PyAPIevalStd(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
                InstrPtr pci);
 pyapi_export str PyAPIevalAggr(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to