Update of /cvsroot/pure-data/externals/grill/py/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20494/source
Modified Files: bound.cpp pyext.cpp pyext.h Log Message: ""
Index: pyext.h =================================================================== RCS file: /cvsroot/pure-data/externals/grill/py/source/pyext.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** pyext.h 21 Aug 2004 04:13:48 -0000 1.15 --- pyext.h 9 Sep 2004 04:06:33 -0000 1.16 *************** *** 66,69 **** --- 66,71 ----
static pyext *GetThis(PyObject *self); + void SetThis(); + V ClearBinding(); BL MakeInstance();
Index: bound.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/py/source/bound.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** bound.cpp 31 Aug 2004 04:07:35 -0000 1.10 --- bound.cpp 9 Sep 2004 04:06:33 -0000 1.11 *************** *** 133,136 **** --- 133,138 ---- if(!pyobj) return;
+ FLEXT_ASSERT(GetThis(pyobj)); + void *data = NULL; const t_symbol *sym = NULL;
Index: pyext.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/py/source/pyext.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** pyext.cpp 31 Aug 2004 04:07:35 -0000 1.19 --- pyext.cpp 9 Sep 2004 04:06:33 -0000 1.20 *************** *** 88,91 **** --- 88,98 ---- }
+ void pyext::SetThis() + { + // remember the this pointer + PyObject *th = PyLong_FromVoidPtr(this); + int ret = PyObject_SetAttrString(pyobj,"_this",th); // ref is taken + } +
#if FLEXT_SYS == FLEXT_SYS_MAX *************** *** 255,263 **** BL pyext::DoInit() { ! // remember the this pointer ! PyObject *th = PyLong_FromVoidPtr(this); ! int ret = PyObject_SetAttrString(pyobj,"_this",th); // ref is taken
! // call init now, after _this has been set, which is // important for eventual callbacks from __init__ to c PyObject *pargs = MakePyArgs(NULL,args.Count(),args.Atoms(),-1,true); --- 262,268 ---- BL pyext::DoInit() { ! SetThis();
! // call init now, after _this has been set, which is // important for eventual callbacks from __init__ to c PyObject *pargs = MakePyArgs(NULL,args.Count(),args.Atoms(),-1,true); *************** *** 331,334 **** --- 336,341 ---- Register("_pyext"); // self
+ SetThis(); + PY_UNLOCK }