aboutsummaryrefslogtreecommitdiff
path: root/externals
diff options
context:
space:
mode:
Diffstat (limited to 'externals')
-rw-r--r--externals/grill/py/py.vcproj15
-rw-r--r--externals/grill/py/readme.txt1
-rw-r--r--externals/grill/py/source/bound.cpp2
-rw-r--r--externals/grill/py/source/pyext.cpp15
-rw-r--r--externals/grill/py/source/pyext.h2
5 files changed, 24 insertions, 11 deletions
diff --git a/externals/grill/py/py.vcproj b/externals/grill/py/py.vcproj
index cbc08f0f..a6e974c0 100644
--- a/externals/grill/py/py.vcproj
+++ b/externals/grill/py/py.vcproj
@@ -3,6 +3,7 @@
ProjectType="Visual C++"
Version="7.10"
Name="py"
+ ProjectGUID="{98512688-BE2E-4C17-A7D4-92BC21DC6FFE}"
SccProjectName="py"
SccAuxPath=""
SccLocalPath="."
@@ -291,14 +292,14 @@
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="pd.lib pthreadVC.lib"
+ AdditionalDependencies="flext_ld.lib pd.lib pthreadVC.lib"
OutputFile="$(outdir)/py.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
- AdditionalLibraryDirectories="&quot;f:\prog\pd\pd-cvs/bin&quot;;f:\prog\packs\pthreads;&quot;f:\prog\packs\Python-2.3.2\PCbuild&quot;"
+ AdditionalLibraryDirectories="f:\prog\max\flext\pd-msvc;&quot;f:\prog\pd\pd-cvs/bin&quot;;f:\prog\packs\pthreads;&quot;f:\prog\packs\Python-2.3.4\PCbuild&quot;"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile=".\pd-msvc\td/py.pdb"
- ImportLibrary=".\pd-msvc\td/py.lib"
+ ImportLibrary=".\pd-msvc\sd/py.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
@@ -341,7 +342,7 @@
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="f:\prog\pd\pd-cvs\src,f:\prog\packs\pthreads;f:\prog\max\flext\source,C:\Programme\prog\Python22\include"
+ AdditionalIncludeDirectories="&quot;f:\prog\pd\pd-cvs\src&quot;;f:\prog\packs\pthreads;f:\prog\max\flext\source;C:\Programme\prog\Python23\include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FLEXT_SYS=2;FLEXT_SHARED"
StringPooling="TRUE"
RuntimeLibrary="2"
@@ -355,13 +356,13 @@
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="pd.lib pthreadVC.lib"
+ AdditionalDependencies="flext_l.lib pd.lib pthreadVC.lib"
OutputFile="$(outdir)\py.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
- AdditionalLibraryDirectories="f:\prog\pd\pd-cvs/bin;f:\prog\packs\pthreads,C:\Programme\prog\Python22\libs"
+ AdditionalLibraryDirectories="f:\prog\max\flext\pd-msvc;&quot;f:\prog\pd\pd-cvs/bin&quot;;f:\prog\packs\pthreads;C:\Programme\prog\Python23\libs"
ProgramDatabaseFile=".\pd-msvc\tr/py.pdb"
- ImportLibrary=".\pd-msvc\tr/py.lib"
+ ImportLibrary=".\pd-msvc\sr/py.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
diff --git a/externals/grill/py/readme.txt b/externals/grill/py/readme.txt
index 57a44661..25a64365 100644
--- a/externals/grill/py/readme.txt
+++ b/externals/grill/py/readme.txt
@@ -85,6 +85,7 @@ Version history:
0.1.4:
- ADD: better (and independent) handling of inlet and outlet count (as class variables or dynamically initialized in __init__)
- FIX: many memory leaks associated to ***GetItem stuff (big thanks to sven!)
+- FIX: set "this" memory in object after reloading script
0.1.3:
- FIX: class variables are now set atomic if parameter list has only 1 element
diff --git a/externals/grill/py/source/bound.cpp b/externals/grill/py/source/bound.cpp
index 75a462e4..6fe0cd2b 100644
--- a/externals/grill/py/source/bound.cpp
+++ b/externals/grill/py/source/bound.cpp
@@ -132,6 +132,8 @@ V pyext::ClearBinding()
// in case the object couldn't be constructed...
if(!pyobj) return;
+ FLEXT_ASSERT(GetThis(pyobj));
+
void *data = NULL;
const t_symbol *sym = NULL;
diff --git a/externals/grill/py/source/pyext.cpp b/externals/grill/py/source/pyext.cpp
index adaacc0e..e8440081 100644
--- a/externals/grill/py/source/pyext.cpp
+++ b/externals/grill/py/source/pyext.cpp
@@ -87,6 +87,13 @@ pyext *pyext::GetThis(PyObject *self)
}
}
+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
static short patcher_myvol(t_patcher *x)
@@ -254,11 +261,9 @@ pyext::~pyext()
BL pyext::DoInit()
{
- // remember the this pointer
- PyObject *th = PyLong_FromVoidPtr(this);
- int ret = PyObject_SetAttrString(pyobj,"_this",th); // ref is taken
+ SetThis();
- // call init now, after _this has been set, which is
+ // 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);
if(!pargs) PyErr_Print();
@@ -330,6 +335,8 @@ V pyext::m_reload()
Reregister("_pyext"); // the others
Register("_pyext"); // self
+ SetThis();
+
PY_UNLOCK
}
diff --git a/externals/grill/py/source/pyext.h b/externals/grill/py/source/pyext.h
index c073fa74..4b3e1b17 100644
--- a/externals/grill/py/source/pyext.h
+++ b/externals/grill/py/source/pyext.h
@@ -65,6 +65,8 @@ private:
static V Setup(t_classid);
static pyext *GetThis(PyObject *self);
+ void SetThis();
+
V ClearBinding();
BL MakeInstance();
BL DoInit();