summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cppgenerator.cpp2
-rw-r--r--libshiboken/basewrapper.cpp2
-rw-r--r--tests/samplebinding/typesystem_sample.xml2
3 files changed, 3 insertions, 3 deletions
diff --git a/cppgenerator.cpp b/cppgenerator.cpp
index 55add07e..57e509da 100644
--- a/cppgenerator.cpp
+++ b/cppgenerator.cpp
@@ -909,7 +909,7 @@ void CppGenerator::writeMethodWrapper(QTextStream& s, const AbstractMetaFunction
s << INDENT << "if (revOpMethod && PyCallable_Check(revOpMethod)) {" << endl;
{
Indentation indent(INDENT);
- s << INDENT << PYTHON_RETURN_VAR << " = PyObject_CallFunction(revOpMethod, \"O\", self);" << endl;
+ s << INDENT << PYTHON_RETURN_VAR << " = PyObject_CallFunction(revOpMethod, const_cast<char*>(\"O\"), self);" << endl;
s << INDENT << "if (PyErr_Occurred() && (PyErr_ExceptionMatches(PyExc_NotImplementedError)";
s << " || PyErr_ExceptionMatches(PyExc_AttributeError))) {" << endl;
{
diff --git a/libshiboken/basewrapper.cpp b/libshiboken/basewrapper.cpp
index 92b6b1d3..dde7a715 100644
--- a/libshiboken/basewrapper.cpp
+++ b/libshiboken/basewrapper.cpp
@@ -426,7 +426,7 @@ static PyObject* SbkBaseWrapper_get_dict(SbkBaseWrapper* obj)
}
static PyGetSetDef SbkBaseWrapper_getsetlist[] = {
- {"__dict__", (getter)SbkBaseWrapper_get_dict, 0},
+ {const_cast<char*>("__dict__"), (getter)SbkBaseWrapper_get_dict, 0},
{0} // Sentinel
};
diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml
index 8a36ec05..cfe709a6 100644
--- a/tests/samplebinding/typesystem_sample.xml
+++ b/tests/samplebinding/typesystem_sample.xml
@@ -880,7 +880,7 @@
%0 = new %TYPE();
</inject-code>
<inject-code class="target" position="end">
- Shiboken::AutoDecRef result(PyObject_CallMethod(%PYSELF, "setHeight", "i", 2));
+ Shiboken::AutoDecRef result(PyObject_CallMethod(%PYSELF, const_cast&lt;char*>("setHeight"), const_cast&lt;char*>("i"), 2));
</inject-code>
</add-function>
</value-type>