diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2005-07-30 12:22:11 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2005-07-30 12:22:11 +0000 |
commit | 9b39e0d94c73773d0dc4b11d9355798d941921e8 (patch) | |
tree | d9c2f3fad3974394cb184868282a8b6366c0fb8e /externals/grill/py/source/pybase.cpp | |
parent | 5f9f3ed9b7c2ff07d8745c81d1a085c8eaa08737 (diff) |
corrected Python object propagation (attribute "py") and adjusted help files
path setting based on new flext functionality
much better detach method handling (one thread for all object instances)
svn path=/trunk/; revision=3389
Diffstat (limited to 'externals/grill/py/source/pybase.cpp')
-rw-r--r-- | externals/grill/py/source/pybase.cpp | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/externals/grill/py/source/pybase.cpp b/externals/grill/py/source/pybase.cpp index d569a84c..2457974f 100644 --- a/externals/grill/py/source/pybase.cpp +++ b/externals/grill/py/source/pybase.cpp @@ -433,20 +433,21 @@ void pybase::AddToPath(const char *dir) }
}
-void pybase::AddCurrentPath(t_canvas *cnv)
+void pybase::AddCurrentPath(flext_base *o)
{
-#if FLEXT_SYS == FLEXT_SYS_PD
- // add dir of current patch to path
- AddToPath(GetString(canvas_getdir(cnv)));
+ char dir[1024];
+
+ // add dir of current patch to path
+ o->GetCanvasDir(dir,sizeof(dir));
+ if(*dir) AddToPath(dir);
+
// add current dir to path
+#if FLEXT_SYS == FLEXT_SYS_PD
AddToPath(GetString(canvas_getcurrentdir()));
-#elif FLEXT_SYS == FLEXT_SYS_MAX
- char dir[1024];
- short path = patcher_myvol(cnv);
- path_topathname(path,NULL,dir);
- AddToPath(dir);
-#else
- #pragma message("Adding current dir to path is not implemented")
+#elif FLEXT_SYS == FLEXT_SYS_MAX
+ short path = path_getdefault();
+ path_topathname(path,NULL,dir);
+ AddToPath(dir);
#endif
}
@@ -699,19 +700,6 @@ void pybase::erasethreads() }
#endif
-#if FLEXT_SYS == FLEXT_SYS_MAX
-short pybase::patcher_myvol(t_patcher *x)
-{
- t_box *w;
- if (x->p_vol)
- return x->p_vol;
- else if (w = (t_box *)x->p_vnewobj)
- return patcher_myvol(w->b_patcher);
- else
- return 0;
-}
-#endif
-
bool pybase::collect()
{
if(gcollect) {
|