diff options
author | Lauro Neto <lauro.neto@openbossa.org> | 2010-10-07 15:30:15 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:07:20 -0300 |
commit | 286a50ccea697737591227452e8054096730e321 (patch) | |
tree | e7b93367d992041bf19b046985df2eb1db625527 /generator | |
parent | 128a3194650e30e6e8240d18c1b6b8c6839df9cd (diff) |
Remove uneeded flag check.
Fixes #405
This check was preventing operations between two
Flags. Wrong argument type now are handled in the
Converter calls.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Reviewer: Hugo Lima <hugo.lima@openbossa.org>
Reviewer: Renato Filho <renato.filho@openbossa.org>
Diffstat (limited to 'generator')
-rw-r--r-- | generator/cppgenerator.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp index a2186e0e6..b890df64b 100644 --- a/generator/cppgenerator.cpp +++ b/generator/cppgenerator.cpp @@ -3280,17 +3280,6 @@ void CppGenerator::writeFlagsBinaryOperator(QTextStream& s, const AbstractMetaEn s << "PyObject* " << cpythonEnumName(cppEnum) << "___" << pyOpName << "__(PyObject* self, PyObject* arg)" << endl; s << '{' << endl; - // We need to check the type of self because self and arg can be swapped - s << INDENT << "if (" << converter << "checkType(self) && " << converter << "checkType(arg))" << endl; - s << INDENT << '{' << endl; - { - Indentation indent(INDENT); - s << INDENT << "PyErr_Format(PyExc_TypeError, \"unsupported operand type(s) for %s: '%s' and '%s'\", \"" - << cppOpName << "\", self->ob_type->tp_name, arg->ob_type->tp_name);" << endl; - s << INDENT << "return 0;" << endl; - } - s << INDENT << '}' << endl << endl; - s << INDENT << "return Shiboken::Converter< " << flagsEntry->originalName() << " >::toPython(" << endl; { Indentation indent(INDENT); |