diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-01-04 09:03:54 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-01-04 09:43:57 +0300 |
commit | 8106a6b75d45cc7472fd92f3b045697e30be8c73 (patch) | |
tree | 3b81857d4df29ce8bcc8d0043045aa6c713e4a78 /source/blender/freestyle/intern/python/BPy_Freestyle.cpp | |
parent | c41431f1e9e75a424717b4080434b940c2685c20 (diff) |
mathutils: refactor instantiation
remove 'type' argument, very few mathutils objects are wrapped,
add new function for creating wrapped objects.
also fixes unlikely memory leak if the data-array can't be allocated.
Diffstat (limited to 'source/blender/freestyle/intern/python/BPy_Freestyle.cpp')
-rw-r--r-- | source/blender/freestyle/intern/python/BPy_Freestyle.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp index ee0e7dfab3e..f4ead300d5e 100644 --- a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp +++ b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp @@ -153,7 +153,7 @@ static PyObject *Freestyle_blendRamp(PyObject *self, PyObject *args) return NULL; } ramp_blend(type, a, fac, b); - return Vector_CreatePyObject(a, 3, Py_NEW, NULL); + return Vector_CreatePyObject(a, 3, NULL); } #include "BKE_texture.h" /* do_colorband() */ @@ -187,7 +187,7 @@ static PyObject *Freestyle_evaluateColorRamp(PyObject *self, PyObject *args) PyErr_SetString(PyExc_ValueError, "failed to evaluate the color ramp"); return NULL; } - return Vector_CreatePyObject(out, 4, Py_NEW, NULL); + return Vector_CreatePyObject(out, 4, NULL); } #include "DNA_color_types.h" |