aboutsummaryrefslogtreecommitdiff
path: root/externals/grill
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
parentdb005cd335dbdecbf2e555c92a40d6ffdea0ca96 (diff)
""
svn path=/trunk/; revision=2057
Diffstat (limited to 'externals/grill')
-rwxr-xr-xexternals/grill/py/makefile.pd-darwin4
-rw-r--r--externals/grill/py/readme.txt1
-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
5 files changed, 26 insertions, 20 deletions
diff --git a/externals/grill/py/makefile.pd-darwin b/externals/grill/py/makefile.pd-darwin
index 6b73c207..46e50bab 100755
--- a/externals/grill/py/makefile.pd-darwin
+++ b/externals/grill/py/makefile.pd-darwin
@@ -28,8 +28,8 @@ endif
ifdef FLEXT_SHARED
-CFLAGS+=-dynamic -DFLEXT_SHARED
-LDFLAGS+=-dynamic -L$(FLEXTPATH)
+CFLAGS+=-DFLEXT_SHARED
+LDFLAGS+=-L$(FLEXTPATH)
FLEXTLIB=-lflext
else
diff --git a/externals/grill/py/readme.txt b/externals/grill/py/readme.txt
index 6ec16e07..e4916be4 100644
--- a/externals/grill/py/readme.txt
+++ b/externals/grill/py/readme.txt
@@ -88,6 +88,7 @@ Version history:
- FIX: set "this" memory in object after reloading script
- ADD: _getvalue,_setvalue to access PD values
- FIX: don't shout when Python script returns PyNone
+- ADD: alias creation names pyext. and pyx. take the script name also for the class name
0.1.3:
- FIX: class variables are now set atomic if parameter list has only 1 element
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();