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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-02-16 21:13:59 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-02-16 21:13:59 +0400
commit90ed5ea4ea278b4aadf9187e4e2b92ef3221001b (patch)
tree4cef16d0a4333db6e08c82e2860b6256b8a0b392 /source/blender/freestyle/intern/python/Interface1D
parent06c51df4dbbba27d273514d922e20f89e5a1e025 (diff)
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.
Diffstat (limited to 'source/blender/freestyle/intern/python/Interface1D')
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp8
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp4
2 files changed, 3 insertions, 9 deletions
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,
diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp
index abda2ca1179..847794c74c0 100644
--- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp
@@ -179,9 +179,7 @@ PyDoc_STRVAR(FEdgeSmooth_material_doc,
static PyObject *FEdgeSmooth_material_get(BPy_FEdgeSmooth *self, void *UNUSED(closure))
{
- // FIXME frs_material() returns a const reference.
- FrsMaterial m(self->fes->frs_material());
- return BPy_FrsMaterial_from_FrsMaterial(m);
+ return BPy_FrsMaterial_from_FrsMaterial(self->fes->frs_material());
}
PyDoc_STRVAR(FEdgeSmooth_face_mark_doc,