From 6cd036ab96fa50b280a6a0cfda7f09f1c1f57600 Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Fri, 22 Feb 2013 01:29:50 +0000 Subject: Code clean-up: Py_TYPE(self)->tp_name instead of ((PyObject *)self)->ob_type->tp_name. --- source/blender/freestyle/intern/python/BPy_Interface0D.cpp | 2 +- source/blender/freestyle/intern/python/BPy_Interface1D.cpp | 2 +- source/blender/freestyle/intern/python/BPy_Iterator.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/freestyle/intern') diff --git a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp index b73942aa357..d382cbdf97b 100644 --- a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp @@ -134,7 +134,7 @@ PyDoc_STRVAR(Interface0D_name_doc, static PyObject *Interface0D_name_get(BPy_Interface0D *self, void *UNUSED(closure)) { - return PyUnicode_FromString(((PyObject *)self)->ob_type->tp_name); + return PyUnicode_FromString(Py_TYPE(self)->tp_name); } PyDoc_STRVAR(Interface0D_point_3d_doc, diff --git a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp index 3511804c690..2851c09209a 100644 --- a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp @@ -200,7 +200,7 @@ PyDoc_STRVAR(Interface1D_name_doc, static PyObject *Interface1D_name_get(BPy_Interface1D *self, void *UNUSED(closure)) { - return PyUnicode_FromString(((PyObject *)self)->ob_type->tp_name); + return PyUnicode_FromString(Py_TYPE(self)->tp_name); } PyDoc_STRVAR(Interface1D_id_doc, diff --git a/source/blender/freestyle/intern/python/BPy_Iterator.cpp b/source/blender/freestyle/intern/python/BPy_Iterator.cpp index b29620cc8fe..df9f462eba9 100644 --- a/source/blender/freestyle/intern/python/BPy_Iterator.cpp +++ b/source/blender/freestyle/intern/python/BPy_Iterator.cpp @@ -158,7 +158,7 @@ PyDoc_STRVAR(Iterator_name_doc, static PyObject *Iterator_name_get(BPy_Iterator *self, void *UNUSED(closure)) { - return PyUnicode_FromString(((PyObject *)self)->ob_type->tp_name); + return PyUnicode_FromString(Py_TYPE(self)->tp_name); } PyDoc_STRVAR(Iterator_is_begin_doc, -- cgit v1.2.3