From 9b39e0d94c73773d0dc4b11d9355798d941921e8 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Sat, 30 Jul 2005 12:22:11 +0000 Subject: 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 --- externals/grill/py/source/pybase.cpp | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) (limited to 'externals/grill/py/source/pybase.cpp') 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) { -- cgit v1.2.1