Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Letwory <nathan@letworyinteractive.com>2006-11-23 14:54:50 +0300
committerNathan Letwory <nathan@letworyinteractive.com>2006-11-23 14:54:50 +0300
commitd38a8b20b904687026de14e67aa3084a8037ed67 (patch)
tree192ff12f495af25b0b623e8353b7acab6601ecfd /source/blender/python/api2_2x/Node.c
parentf4aa5064e97b05f691a36fb9e16e0ccd4ce10b64 (diff)
* free socket names
* some misc changes
Diffstat (limited to 'source/blender/python/api2_2x/Node.c')
-rw-r--r--source/blender/python/api2_2x/Node.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/python/api2_2x/Node.c b/source/blender/python/api2_2x/Node.c
index 88208307d25..f5d6fa1d71a 100644
--- a/source/blender/python/api2_2x/Node.c
+++ b/source/blender/python/api2_2x/Node.c
@@ -77,7 +77,12 @@ static int dict_socks_to_typeinfo(PyObject *dict, bNodeSocketType **socks, int l
}
newsocks[a].type = -1;
if(*socks) {
- fprintf(stderr, "\t> freeing *socks %p\n", *socks);
+ int b = 0;
+ while((*socks)[b].type!=-1) {
+ MEM_freeN((*socks)[b].name);
+ (*socks)[b].name = NULL;
+ b++;
+ }
MEM_freeN(*socks);
}
*socks = newsocks;
@@ -102,9 +107,7 @@ static int Map_socketdef(PyObject *self, PyObject *args, void *closure)
bNode *node = NULL;
BPy_OutputDefMap *out= NULL;
BPy_InputDefMap *in= NULL;
- bNodeSocket *sock, *nsock;
int pos=0;
- PyObject *key, *value;
switch((int)closure) {
case 'I':
@@ -1041,7 +1044,7 @@ static int ShadeInput_compare(BPy_ShadeInput *a, BPy_ShadeInput *b)
static PyObject *ShadeInput_repr(BPy_ShadeInput *self)
{
- return PyString_FromString( "[ShadeInput]" );
+ return PyString_FromFormat( "[ShadeInput @ \"%p\"]", self);
}
BPy_ShadeInput *ShadeInput_CreatePyObject(ShadeInput *shi)