aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/py/source/pybase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill/py/source/pybase.cpp')
-rw-r--r--externals/grill/py/source/pybase.cpp41
1 files changed, 13 insertions, 28 deletions
diff --git a/externals/grill/py/source/pybase.cpp b/externals/grill/py/source/pybase.cpp
index 09fd8687..e68d9929 100644
--- a/externals/grill/py/source/pybase.cpp
+++ b/externals/grill/py/source/pybase.cpp
@@ -75,6 +75,7 @@ PyObject *pybase::builtins_obj = NULL;
PyObject *pybase::builtins_dict = NULL;
const t_symbol *pybase::sym_fint = NULL;
+const t_symbol *pybase::sym_response = NULL;
// -----------------------------------------------------------------------------------------------------------
@@ -83,8 +84,8 @@ void initsymbol();
void initsamplebuffer();
void pybase::lib_setup()
-{
- post("");
+{
+ post("");
post("------------------------------------------------");
post("py/pyext %s - python script objects",PY__VERSION);
post("(C)2002-2005 Thomas Grill - http://grrrr.org/ext");
@@ -98,6 +99,16 @@ void pybase::lib_setup()
// -------------------------------------------------------------
+ sym_response = flext::MakeSymbol("response");
+
+#if FLEXT_SYS == FLEXT_SYS_PD
+ sym_fint = sym_float;
+#else
+ sym_fint = sym_int;
+#endif
+
+ // -------------------------------------------------------------
+
Py_Initialize();
#ifdef FLEXT_DEBUG
@@ -163,12 +174,6 @@ void pybase::lib_setup()
initsamplebuffer();
PyModule_AddObject(module_obj,"Buffer",(PyObject *)&pySamplebuffer_Type);
-#if FLEXT_SYS == FLEXT_SYS_PD
- sym_fint = sym_float;
-#else
- sym_fint = sym_int;
-#endif
-
// -------------------------------------------------------------
FLEXT_SETUP(pyobj);
@@ -548,17 +553,6 @@ bool pybase::OutObject(flext_base *ext,int o,PyObject *obj)
return false;
}
-static const t_symbol *sym_response = flext::MakeSymbol("response");
-
-void pybase::Respond(bool b)
-{
- if(respond) {
- t_atom a;
- SetBool(a,b);
- DumpOut(sym_response,1,&a);
- }
-}
-
void pybase::Reload()
{
PyThreadState *state = PyLock();
@@ -725,15 +719,6 @@ void pybase::thrworker(thr_params *p)
--th->thrcount; // \todo this should be atomic
}
-bool pybase::qucall(PyObject *fun,PyObject *args)
-{
- FifoEl *el = qufifo.New();
- el->Set(this,fun,args);
- qufifo.Put(el);
- qucond.Signal();
- return true;
-}
-
void pybase::quworker(thr_params *)
{
FifoEl *el;