summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauro Neto <lauro.neto@openbossa.org>2010-10-07 15:30:15 -0300
committerLauro Neto <lauro.neto@openbossa.org>2010-10-07 15:56:37 -0300
commit9cf34f01876807559e018ad616fc4aa2fd6ddf05 (patch)
tree9d6fa208dd96337579ea1add4674914ebd6ef48f
parented8481cd7accabe1b9a88aa27101bfe13bb87a62 (diff)
downloadshiboken-9cf34f01876807559e018ad616fc4aa2fd6ddf05.tar.gz
shiboken-9cf34f01876807559e018ad616fc4aa2fd6ddf05.tar.xz
shiboken-9cf34f01876807559e018ad616fc4aa2fd6ddf05.zip
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>
-rw-r--r--generator/cppgenerator.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp
index a2186e0e..b890df64 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);