py3.7 fix

PyUnicode_AsUTF8() returns const char* in py3.7 instead of char*. Making
changes to reflect that which should also be safe in
other Python versions.
This commit is contained in:
Michal Ulianko
2018-08-17 14:42:21 +02:00
committed by wmayer
parent f721dd9a17
commit 2e2b8cba6a
12 changed files with 34 additions and 34 deletions

View File

@@ -190,7 +190,7 @@ TopoShapePyOld::~TopoShapePyOld() // Everything handled in parent
//--------------------------------------------------------------------------
// TopoShapePyOld Attributes
//--------------------------------------------------------------------------
PyObject *TopoShapePyOld::_getattr(char *attr) // __getattr__ function: note only need to handle new state
PyObject *TopoShapePyOld::_getattr(const char *attr) // __getattr__ function: note only need to handle new state
{
try{
// Access the number of attributes at this label
@@ -205,7 +205,7 @@ PyObject *TopoShapePyOld::_getattr(char *attr) // __getattr__ function: note
}
}
int TopoShapePyOld::_setattr(char *attr, PyObject *value) // __setattr__ function: note only need to handle new state
int TopoShapePyOld::_setattr(const char *attr, PyObject *value) // __setattr__ function: note only need to handle new state
{
if (Base::streq(attr, "Real")) // settable new state
;
@@ -712,4 +712,4 @@ PyObject *TopoShapePyOld::exportSTL(PyObject *args)
Py_Return;
}
#endif
#endif