Ticket #5590: suppress_warnings.diff

File suppress_warnings.diff, 1.9 KB (added by Bogdan Opanchuk <mantihor@…>, 11 years ago)

proposed patch

  • src/object/class.cpp

     
    7676  static int property_init(PyObject *self, PyObject *args, PyObject *kwds)
    7777  {
    7878      PyObject *get = NULL, *set = NULL, *del = NULL, *doc = NULL;
    79       static char *kwlist[] = {"fget", "fset", "fdel", "doc", 0};
     79      static const char *kwlist[] = {"fget", "fset", "fdel", "doc", 0};
    8080      propertyobject *prop = (propertyobject *)self;
    8181
    8282      if (!PyArg_ParseTupleAndKeywords(args, kwds, "|OOOO:property",
    83                   kwlist, &get, &set, &del, &doc))
     83                  const_cast<char **>(kwlist), &get, &set, &del, &doc))
    8484          return -1;
    8585
    8686      if (get == Py_None)
  • src/converter/builtin_converters.cpp

     
    366366      static PyTypeObject const* get_pytype() { return &PyFloat_Type;}
    367367  };
    368368
     369#if PY_VERSION_HEX >= 0x03000000
    369370  unaryfunc py_unicode_as_string_unaryfunc = PyUnicode_AsUTF8String;
     371#endif
    370372
    371373  // A SlotPolicy for extracting C++ strings from Python objects.
    372374  struct string_rvalue_from_python
  • src/converter/from_python.cpp

     
    4444    // First check to see if it's embedded in an extension class
    4545    // instance, as a special case.
    4646    data.convertible = objects::find_instance_impl(source, converters.target_type, converters.is_shared_ptr);
    47     if (data.convertible)
    48     {
    4947        data.construct = 0;
    50     }
    51     else
     48    if (!data.convertible)
    5249    {
    5350        for (rvalue_from_python_chain const* chain = converters.rvalue_chain;
    5451             chain != 0;