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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user