aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/py/source/modmeth.cpp
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2005-03-13 04:59:47 +0000
committerThomas Grill <xovo@users.sourceforge.net>2005-03-13 04:59:47 +0000
commit3ce0fb7e8ad57909fadcd4072817d69bc54e3a66 (patch)
treef4d4478420cc9f34bf26835f2edc5bd03f95a86b /externals/grill/py/source/modmeth.cpp
parent0e0bfeecb60ffa25d997830553685482c666b7ba (diff)
pydsp: share dsp buffer objects at inplace operation
DSP support for py/pyext: new objects pyext~,pyx~,pyext.~,pyx.~ new base class for py and pyext classes preset sys.argv for module loading support for buffer objects (preliminary) py: bang in left inlet now really triggers without arguments fixes for detached operation and single-threaded version little restructuring adjust pd and py files for correct argument passing more optimizations update for new flext callback naming use lock count instead of message queuing to avoid py->py messaging deadlock pyext: fix for inlet count svn path=/trunk/; revision=2624
Diffstat (limited to 'externals/grill/py/source/modmeth.cpp')
-rw-r--r--externals/grill/py/source/modmeth.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/externals/grill/py/source/modmeth.cpp b/externals/grill/py/source/modmeth.cpp
index 4054d3ce..bbbe64b1 100644
--- a/externals/grill/py/source/modmeth.cpp
+++ b/externals/grill/py/source/modmeth.cpp
@@ -12,24 +12,24 @@ WARRANTIES, see the file, "license.txt," in this distribution.
// function table for module
-PyMethodDef py::func_tbl[] =
+PyMethodDef pybase::func_tbl[] =
{
- { "_send", py::py_send, METH_VARARGS,"Send message to a named object" },
+ { "_send", pybase::py_send, METH_VARARGS,"Send message to a named object" },
#ifdef FLEXT_THREADS
- { "_priority", py::py_priority, METH_VARARGS,"Set priority of current thread" },
+ { "_priority", pybase::py_priority, METH_VARARGS,"Set priority of current thread" },
#endif
- { "_samplerate", py::py_samplerate, METH_NOARGS,"Get system sample rate" },
- { "_blocksize", py::py_blocksize, METH_NOARGS,"Get system block size" },
+ { "_samplerate", pybase::py_samplerate, METH_NOARGS,"Get system sample rate" },
+ { "_blocksize", pybase::py_blocksize, METH_NOARGS,"Get system block size" },
#if FLEXT_SYS == FLEXT_SYS_PD
- { "_getvalue", py::py_getvalue, METH_VARARGS,"Get value of a 'value' object" },
- { "_setvalue", py::py_setvalue, METH_VARARGS,"Set value of a 'value' object" },
+ { "_getvalue", pybase::py_getvalue, METH_VARARGS,"Get value of a 'value' object" },
+ { "_setvalue", pybase::py_setvalue, METH_VARARGS,"Set value of a 'value' object" },
#endif
{NULL, NULL, 0, NULL} // sentinel
};
-const char *py::py_doc =
+const char *pybase::py_doc =
"py/pyext - python external object for PD and Max/MSP, (C)2002-2005 Thomas Grill\n"
"\n"
"This is the pyext module. Available function:\n"
@@ -45,7 +45,7 @@ const char *py::py_doc =
#ifdef FLEXT_THREADS
-void py::tick(void *)
+void pybase::tick(void *)
{
Lock();
@@ -57,7 +57,7 @@ void py::tick(void *)
else {
// still active threads
if(!--stoptick) {
- post("%s - Threads couldn't be stopped entirely - %i remaining",thisName(),thrcount);
+ post("py/pyext - Threads couldn't be stopped entirely - %i remaining",thrcount);
shouldexit = false;
}
else
@@ -69,7 +69,7 @@ void py::tick(void *)
}
#endif
-void py::m_stop(int argc,const t_atom *argv)
+void pybase::m_stop(int argc,const t_atom *argv)
{
#ifdef FLEXT_THREADS
if(thrcount) {
@@ -93,17 +93,17 @@ void py::m_stop(int argc,const t_atom *argv)
#endif
}
-PyObject *py::py_samplerate(PyObject *self,PyObject *args)
+PyObject *pybase::py_samplerate(PyObject *self,PyObject *args)
{
return PyFloat_FromDouble(sys_getsr());
}
-PyObject *py::py_blocksize(PyObject *self,PyObject *args)
+PyObject *pybase::py_blocksize(PyObject *self,PyObject *args)
{
return PyLong_FromLong(sys_getblksize());
}
-PyObject *py::py_send(PyObject *,PyObject *args)
+PyObject *pybase::py_send(PyObject *,PyObject *args)
{
// should always be a tuple
FLEXT_ASSERT(PyTuple_Check(args));
@@ -153,7 +153,7 @@ PyObject *py::py_send(PyObject *,PyObject *args)
}
#ifdef FLEXT_THREADS
-PyObject *py::py_priority(PyObject *self,PyObject *args)
+PyObject *pybase::py_priority(PyObject *self,PyObject *args)
{
int val;
if(!PyArg_ParseTuple(args, "i:py_priority", &val)) {
@@ -168,7 +168,7 @@ PyObject *py::py_priority(PyObject *self,PyObject *args)
#endif
#if FLEXT_SYS == FLEXT_SYS_PD
-PyObject *py::py_getvalue(PyObject *self,PyObject *args)
+PyObject *pybase::py_getvalue(PyObject *self,PyObject *args)
{
FLEXT_ASSERT(PyTuple_Check(args));
@@ -195,7 +195,7 @@ PyObject *py::py_getvalue(PyObject *self,PyObject *args)
return ret;
}
-PyObject *py::py_setvalue(PyObject *self,PyObject *args)
+PyObject *pybase::py_setvalue(PyObject *self,PyObject *args)
{
FLEXT_ASSERT(PyTuple_Check(args));