aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/py/source/pybase.h
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2005-09-26 13:59:59 +0000
committerThomas Grill <xovo@users.sourceforge.net>2005-09-26 13:59:59 +0000
commit4eb1464e5439332693a92ab76776b06d9b0c8700 (patch)
tree8b64a78801a2d3ac3857ffdc2a35407114565790 /externals/grill/py/source/pybase.h
parent0f849641afd27b4e7c9326fbcd402105fd62ced0 (diff)
__str__ method for pyext, to enable print self calls
enable symbol binding for all callables (not only functions and methods) enable optimization of Python code in reease build _isthreaded is now a data member instead of a method compiler flag to exclude DSP objects some cleanups pyext: fix for missing __init__ attribute some optimizations and py reload fix some ASSERTs for explicitly created pyext classes (should be runtime checks i guess) more safety for calls where association python-pd has already been removed fixed typos let _inlets and _outlets default to 0 svn path=/trunk/; revision=3637
Diffstat (limited to 'externals/grill/py/source/pybase.h')
-rw-r--r--externals/grill/py/source/pybase.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/externals/grill/py/source/pybase.h b/externals/grill/py/source/pybase.h
index 49eccbbc..59a1d062 100644
--- a/externals/grill/py/source/pybase.h
+++ b/externals/grill/py/source/pybase.h
@@ -81,7 +81,15 @@ protected:
virtual void Unload() = 0;
void OpenEditor();
- void Respond(bool b);
+
+ void Respond(bool b)
+ {
+ if(respond) {
+ t_atom a;
+ SetBool(a,b);
+ DumpOut(sym_response,1,&a);
+ }
+ }
void Report() { while(PyErr_Occurred()) PyErr_Print(); }
@@ -158,7 +166,14 @@ protected:
#ifdef FLEXT_THREADS
static void thrworker(thr_params *data);
- bool qucall(PyObject *fun,PyObject *args);
+ bool qucall(PyObject *fun,PyObject *args)
+ {
+ FifoEl *el = qufifo.New();
+ el->Set(this,fun,args);
+ qufifo.Put(el);
+ qucond.Signal();
+ return true;
+ }
static void quworker(thr_params *);
void erasethreads();
@@ -169,6 +184,7 @@ protected:
#endif
static const t_symbol *sym_fint; // float or int symbol, depending on native number message type
+ static const t_symbol *sym_response;
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);