Salome HOME
Ensure cmake_build_type is used in SALOME 9.12.0
[tools/sat_salome.git] / products / patches / boost-1.58.0-python-3.7.patch
1 --- boost-1.58.0_ref/libs/python/src/converter/builtin_converters.cpp   2015-03-26 14:16:15.000000000 +0100
2 +++ boost-1.58.0_dev/libs/python/src/converter/builtin_converters.cpp   2023-02-15 13:08:31.233047962 +0100
3 @@ -45,11 +45,16 @@
4    {
5        return PyString_Check(obj) ? PyString_AsString(obj) : 0;
6    }
7 -#else
8 +#elif PY_VERSION_HEX < 0x03070000
9    void* convert_to_cstring(PyObject* obj)
10    {
11        return PyUnicode_Check(obj) ? _PyUnicode_AsString(obj) : 0;
12    }
13 +#else
14 +  void* convert_to_cstring(PyObject* obj)
15 +  {
16 +      return PyUnicode_Check(obj) ? const_cast<void*>(reinterpret_cast<const void*>(_PyUnicode_AsString(obj))) : 0;
17 +  }
18  #endif
19  
20    // Given a target type and a SlotPolicy describing how to perform a