aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/py/source
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2004-09-26 23:03:16 +0000
committerThomas Grill <xovo@users.sourceforge.net>2004-09-26 23:03:16 +0000
commitdc05dfe881d86f2bf5f6c0c9ccf8d847a6ec376d (patch)
treedc411f38745b75f86f2113d283607f31c83542aa /externals/grill/py/source
parentdb005cd335dbdecbf2e555c92a40d6ffdea0ca96 (diff)
""
svn path=/trunk/; revision=2057
Diffstat (limited to 'externals/grill/py/source')
-rw-r--r--externals/grill/py/source/main.cpp4
-rw-r--r--externals/grill/py/source/main.h2
-rw-r--r--externals/grill/py/source/pyext.cpp35
3 files changed, 23 insertions, 18 deletions
diff --git a/externals/grill/py/source/main.cpp b/externals/grill/py/source/main.cpp
index 6a28acc9..8c46b037 100644
--- a/externals/grill/py/source/main.cpp
+++ b/externals/grill/py/source/main.cpp
@@ -31,8 +31,8 @@ V py::lib_setup()
Py_Initialize();
#ifdef FLEXT_DEBUG
- Py_DebugFlag = 1;
-// Py_VerboseFlag = 1;
+// Py_DebugFlag = 1;
+ Py_VerboseFlag = 1;
#endif
#ifdef FLEXT_THREADS
diff --git a/externals/grill/py/source/main.h b/externals/grill/py/source/main.h
index 581efde5..9178a4d7 100644
--- a/externals/grill/py/source/main.h
+++ b/externals/grill/py/source/main.h
@@ -29,7 +29,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#error You need at least flext version 0.4.6
#endif
-#define PY__VERSION "0.1.4pre"
+#define PY__VERSION "0.1.4"
#define PYEXT_MODULE "pyext" // name for module
diff --git a/externals/grill/py/source/pyext.cpp b/externals/grill/py/source/pyext.cpp
index e8440081..27ad942b 100644
--- a/externals/grill/py/source/pyext.cpp
+++ b/externals/grill/py/source/pyext.cpp
@@ -11,7 +11,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include "pyext.h"
#include <flinternal.h>
-FLEXT_LIB_V("pyext pyx",pyext)
+FLEXT_LIB_V("pyext pyext. pyx pyx.",pyext)
V pyext::Setup(t_classid c)
{
@@ -125,6 +125,8 @@ pyext::pyext(I argc,const t_atom *argv):
apre += 2;
}
+ const t_atom *clname = NULL;
+
PY_LOCK
// init script module
@@ -158,20 +160,21 @@ pyext::pyext(I argc,const t_atom *argv):
}
++apre;
+
+ // check for alias creation names
+ if(strrchr(thisName(),'.')) clname = &scr;
}
Register("_pyext");
-// t_symbol *sobj = NULL;
- if(argc > apre) {
- // object name
- if(!IsString(argv[apre]))
- post("%s - object name argument is invalid",thisName());
- else {
- methname = GetSymbol(argv[apre]);
- }
-
- ++apre;
+ if(argc > apre || clname) {
+ if(!clname) clname = &argv[apre++];
+
+ // class name
+ if(!IsString(*clname))
+ post("%s - class name argument is invalid",thisName());
+ else
+ methname = GetSymbol(*clname);
}
if(argc > apre) args(argc-apre,argv+apre);
@@ -237,10 +240,12 @@ pyext::pyext(I argc,const t_atom *argv):
PY_UNLOCK
- FLEXT_ASSERT(inlets >= 0 && outlets >= 0);
-
- AddInAnything(1+inlets);
- AddOutAnything(outlets);
+ if(inlets < 0 || outlets < 0)
+ InitProblem();
+ else {
+ AddInAnything(1+inlets);
+ AddOutAnything(outlets);
+ }
if(!pyobj)
InitProblem();