aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/py/source/pybase.h
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill/py/source/pybase.h')
-rw-r--r--externals/grill/py/source/pybase.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/externals/grill/py/source/pybase.h b/externals/grill/py/source/pybase.h
index 068aeb86..f7b6840b 100644
--- a/externals/grill/py/source/pybase.h
+++ b/externals/grill/py/source/pybase.h
@@ -89,7 +89,7 @@ protected:
static bool IsAnything(const t_symbol *s) { return s && s != sym_float && s != sym_int && s != sym_symbol && s != sym_list && s != sym_pointer; }
static bool IsAtom(const t_symbol *s) { return s == sym_float || s == sym_int || s == sym_symbol || s == sym_pointer; }
- enum retval { nothing,atom,sequ };
+// enum retval { nothing,atom,sequ };
// --- module stuff -----
@@ -136,8 +136,22 @@ protected:
bool xlate;
bool gencall(PyObject *fun,PyObject *args);
+
+ bool docall(PyObject *fun,PyObject *args)
+ {
+ callpy(fun,args);
+ if(PyErr_Occurred()) {
+ exchandle();
+ return false;
+ }
+ else
+ return true;
+ }
+
virtual bool thrcall(void *data) = 0;
- virtual bool callpy(PyObject *fun,PyObject *args) = 0;
+ virtual void callpy(PyObject *fun,PyObject *args) = 0;
+
+ void exchandle();
#if FLEXT_SYS == FLEXT_SYS_MAX
static short patcher_myvol(t_patcher *x);
@@ -164,6 +178,9 @@ protected:
static const t_symbol *sym_fint; // float or int symbol, depending on native number message type
+ static const t_symbol *getone(t_atom &at,PyObject *arg);
+ static const t_symbol *getlist(t_atom *lst,PyObject *seq,int cnt,int offs = 0);
+
public:
#ifdef FLEXT_THREADS