[PD-cvs] externals/grill/py/source py.cpp, 1.31, 1.32 pyargs.cpp, 1.20, 1.21 pybase.cpp, 1.5, 1.6 pybase.h, 1.5, 1.6 pyext.cpp, 1.39, 1.40 pyprefix.h, 1.3, 1.4
Thomas Grill
xovo at users.sourceforge.net
Sat Jul 30 14:22:13 CEST 2005
Update of /cvsroot/pure-data/externals/grill/py/source
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15846/source
Modified Files:
py.cpp pyargs.cpp pybase.cpp pybase.h pyext.cpp pyprefix.h
Log Message:
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)
Index: pyprefix.h
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/py/source/pyprefix.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** pyprefix.h 8 Jul 2005 14:30:31 -0000 1.3
--- pyprefix.h 30 Jul 2005 12:22:11 -0000 1.4
***************
*** 21,26 ****
#endif
! #if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 500)
! #error You need at least flext version 0.5.0
#endif
--- 21,26 ----
#endif
! #if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 501)
! #error You need at least flext version 0.5.1
#endif
Index: pyargs.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/py/source/pyargs.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** pyargs.cpp 19 Jul 2005 13:18:33 -0000 1.20
--- pyargs.cpp 30 Jul 2005 12:22:11 -0000 1.21
***************
*** 180,184 ****
if(isseq(pValue)) {
! int rargc = PySequence_Size(pValue);
if(rargc == 2) {
// check if syntax is symbol/string, list -> anything message
--- 180,187 ----
if(isseq(pValue)) {
! // Python might crash here if pValue is no "real" sequence, but rather e.g. an instance
!
! int rargc = PySequence_Size(pValue);
!
if(rargc == 2) {
// check if syntax is symbol/string, list -> anything message
Index: pybase.h
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/py/source/pybase.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** pybase.h 20 Jul 2005 08:11:18 -0000 1.5
--- pybase.h 30 Jul 2005 12:22:11 -0000 1.6
***************
*** 52,56 ****
AtomList args;
! void AddCurrentPath(t_canvas *cnv);
void GetModulePath(const char *mod,char *dir,int len);
void AddToPath(const char *dir);
--- 52,56 ----
AtomList args;
! void AddCurrentPath(flext_base *o);
void GetModulePath(const char *mod,char *dir,int len);
void AddToPath(const char *dir);
***************
*** 154,161 ****
void exchandle();
- #if FLEXT_SYS == FLEXT_SYS_MAX
- static short patcher_myvol(t_patcher *x);
- #endif
-
static bool collect();
--- 154,157 ----
Index: pybase.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/py/source/pybase.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** pybase.cpp 20 Jul 2005 08:11:18 -0000 1.5
--- pybase.cpp 30 Jul 2005 12:22:11 -0000 1.6
***************
*** 434,451 ****
}
! void pybase::AddCurrentPath(t_canvas *cnv)
{
! #if FLEXT_SYS == FLEXT_SYS_PD
! // add dir of current patch to path
! AddToPath(GetString(canvas_getdir(cnv)));
// add current dir to path
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")
#endif
}
--- 434,452 ----
}
! void pybase::AddCurrentPath(flext_base *o)
{
! 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
! short path = path_getdefault();
! path_topathname(path,NULL,dir);
! AddToPath(dir);
#endif
}
***************
*** 700,716 ****
#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()
{
--- 701,704 ----
Index: pyext.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/py/source/pyext.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** pyext.cpp 20 Jul 2005 08:11:18 -0000 1.39
--- pyext.cpp 30 Jul 2005 12:22:11 -0000 1.40
***************
*** 144,148 ****
// init script module
if(argc) {
! AddCurrentPath(thisCanvas());
const t_symbol *scr = GetASymbol(*argv);
--- 144,148 ----
// init script module
if(argc) {
! AddCurrentPath(this);
const t_symbol *scr = GetASymbol(*argv);
Index: py.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/py/source/py.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** py.cpp 20 Jul 2005 08:11:18 -0000 1.31
--- py.cpp 30 Jul 2005 12:22:11 -0000 1.32
***************
*** 138,142 ****
// init script module
if(argc) {
! AddCurrentPath(thisCanvas());
const char *sn = GetAString(*argv);
--- 138,142 ----
// init script module
if(argc) {
! AddCurrentPath(this);
const char *sn = GetAString(*argv);
More information about the Pd-cvs
mailing list