From 90ed5ea4ea278b4aadf9187e4e2b92ef3221001b Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Sat, 16 Feb 2013 17:13:59 +0000 Subject: Fix for pointers to auto variables returned from Python wrapper class methods. The previous implementation was a quick workaround of C++ const references. Also removed the unused 'borrowed' flag from the Python wrapper of FrsMaterial. --- .../freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp') diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp index aef1086a641..49da570a9fc 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp @@ -288,9 +288,7 @@ PyDoc_STRVAR(FEdgeSharp_material_right_doc, static PyObject *FEdgeSharp_material_right_get(BPy_FEdgeSharp *self, void *UNUSED(closure)) { - // FIXME aFrsMaterial() returns a const reference. - FrsMaterial m(self->fes->aFrsMaterial()); - return BPy_FrsMaterial_from_FrsMaterial(m); + return BPy_FrsMaterial_from_FrsMaterial(self->fes->aFrsMaterial()); } PyDoc_STRVAR(FEdgeSharp_material_left_doc, @@ -300,9 +298,7 @@ PyDoc_STRVAR(FEdgeSharp_material_left_doc, static PyObject *FEdgeSharp_material_left_get(BPy_FEdgeSharp *self, void *UNUSED(closure)) { - // FIXME bFrsMaterial() returns a const reference. - FrsMaterial m(self->fes->bFrsMaterial()); - return BPy_FrsMaterial_from_FrsMaterial(m); + return BPy_FrsMaterial_from_FrsMaterial(self->fes->bFrsMaterial()); } PyDoc_STRVAR(FEdgeSharp_face_mark_right_doc, -- cgit v1.2.3