Ticket #4125: 4125-use-macros-instead-of-direct-access.patch

File 4125-use-macros-instead-of-direct-access.patch, 757 bytes (added by Matthew Bradbury <matt-bradbury@…>, 12 years ago)
  • libs/python/src/wrapper.cpp

     
    2525           
    2626              if (
    2727                  PyMethod_Check(m.get())
    28                   && ((PyMethodObject*)m.get())->im_self == this->m_self
     28                  && PyMethod_GET_SELF(m.get()) == this->m_self
    2929                  && class_object->tp_dict != 0
    3030              )
    3131              {
     
    3434
    3535
    3636              }
    37               if (borrowed_f != ((PyMethodObject*)m.get())->im_func)
     37              if (borrowed_f != PyMethod_GET_FUNCTION(m.get()))
    3838                  return override(m);
    3939          }
    4040      }