use Py_TYPE macro (no functional changes)

This commit is contained in:
2011-11-03 13:10:37 +00:00
parent 0e51c9014c
commit d210703bca
7 changed files with 27 additions and 27 deletions

View File

@@ -567,7 +567,7 @@ PyObject * Image_setSource (PyImage * self, PyObject * args)
if (self->m_image != NULL)
{
// check type of object
if (pyImageTypes.in(obj->ob_type))
if (pyImageTypes.in(Py_TYPE(obj)))
{
// convert to image struct
PyImage * img = reinterpret_cast<PyImage*>(obj);
@@ -619,7 +619,7 @@ int Image_setFilter (PyImage * self, PyObject * value, void * closure)
if (self->m_image != NULL)
{
// check new value
if (value == NULL || !pyFilterTypes.in(value->ob_type))
if (value == NULL || !pyFilterTypes.in(Py_TYPE(value)))
{
// report value error
PyErr_SetString(PyExc_TypeError, "Invalid type of value");