We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 442bad1 commit 9fe8746Copy full SHA for 9fe8746
1 file changed
src/greenlet/greenlet_refs.hpp
@@ -339,7 +339,7 @@ namespace greenlet {
339
Py_XINCREF(other.p);
340
const T* tmp = this->p;
341
this->p = other.p;
342
- Py_XDECREF(tmp);
+ Py_XDECREF(const_cast<T*>(tmp));
343
return *this;
344
}
345
@@ -851,7 +851,7 @@ namespace greenlet {
851
852
void PyAddObject(const char* name, const PyObject* new_object)
853
{
854
- Py_INCREF(new_object);
+ Py_INCREF(const_cast<PyObject*>(new_object));
855
try {
856
Require(PyModule_AddObject(this->p, name, const_cast<PyObject*>(new_object)));
857
0 commit comments