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:
authorCampbell Barton <ideasman42@gmail.com>2006-07-27 05:18:21 +0400
committerCampbell Barton <ideasman42@gmail.com>2006-07-27 05:18:21 +0400
commitb227c98c443b2106df37a9ebeb04dcd50d6f2e49 (patch)
treeb80eac1e6114fd95c52d7bb467da63c2481a1957 /source/blender/python/api2_2x/quat.c
parent4ee3515bf1751f7f89168f3c5c1fd907ad138ffd (diff)
Addition to Mathutils
vec.normalized() mat.inverted() mat.transposed() made vec/float possible normalize/invert/transpose now return None because they modify the data in place. use the ...(ed) versions to return a modified copy. Fixed Memory leaks from not decreffing PyFloat_AS_DOUBLE from these python functions... (found when testing above functions) ob.rbMass ob.rbRadius matrix.determinant() quat*float vec*float matrix.transpose() EXPP_setModuleConstant Checked all instances of PyFloat_AS_DOUBLE so I dont think there are any mroe leaks there.
Diffstat (limited to 'source/blender/python/api2_2x/quat.c')
-rw-r--r--source/blender/python/api2_2x/quat.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/quat.c b/source/blender/python/api2_2x/quat.c
index 1cd07b0f588..af778d27f07 100644
--- a/source/blender/python/api2_2x/quat.c
+++ b/source/blender/python/api2_2x/quat.c
@@ -462,6 +462,7 @@ static PyObject *Quaternion_mul(PyObject * q1, PyObject * q2)
}
scalar = (float)PyFloat_AS_DOUBLE(f);
+ Py_DECREF(f);
for(x = 0; x < 4; x++) {
quat[x] = quat2->quat[x] * scalar;
}
@@ -478,6 +479,7 @@ static PyObject *Quaternion_mul(PyObject * q1, PyObject * q2)
}
scalar = (float)PyFloat_AS_DOUBLE(f);
+ Py_DECREF(f);
for(x = 0; x < 4; x++) {
quat[x] = quat1->quat[x] * scalar;
}