aboutsummaryrefslogtreecommitdiffstats
path: root/cppgenerator.cpp
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.lima@openbossa.org>2010-04-08 19:19:45 -0300
committerHugo Parente Lima <hugo.lima@openbossa.org>2010-04-12 13:48:33 -0300
commit4623048983f0c230c47909545cb457018d97951b (patch)
tree2cf370dc178e3be2fb793fc52adbfd40169c5524 /cppgenerator.cpp
parent3b61b201210760c922a293f79f5904ba51cda4e2 (diff)
Remove warnings about "deprecated conversion from string constant to 'char*'".
These warnings are due to the Python C API using a char* as parameter when it should const char*. Reviewer: Anderson Lizardo <anderson.lizardo@openbossa.org> Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'cppgenerator.cpp')
-rw-r--r--cppgenerator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/cppgenerator.cpp b/cppgenerator.cpp
index 55add07e9..57e509da0 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;
{