aboutsummaryrefslogtreecommitdiffstats
path: root/cppgenerator.cpp
diff options
context:
space:
mode:
authorLauro Neto <lauro.neto@openbossa.org>2010-02-23 12:38:27 -0300
committerLauro Neto <lauro.neto@openbossa.org>2010-02-23 20:10:28 -0300
commit742eba6e0898f08c5ca04c1eb8292fc3d7b60a43 (patch)
treed7da3367589016c3f1e7f25e081ef139d83aed7b /cppgenerator.cpp
parent58665a95e5f798f76d4ee01f2790f416d494da3c (diff)
Fixing Enum '~' invert operator
Was being registered as __neg__ instead of __invert__
Diffstat (limited to 'cppgenerator.cpp')
-rw-r--r--cppgenerator.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/cppgenerator.cpp b/cppgenerator.cpp
index 8adfd16d7..7ef7a4b09 100644
--- a/cppgenerator.cpp
+++ b/cppgenerator.cpp
@@ -2388,7 +2388,7 @@ void CppGenerator::writeFlagsMethods(QTextStream& s, const AbstractMetaEnum* cpp
writeFlagsInplaceOperator(s, cppEnum, "ior", "|=");
writeFlagsInplaceOperator(s, cppEnum, "ixor", "^=");
- writeFlagsUnaryOperator(s, cppEnum, "neg", "~");
+ writeFlagsUnaryOperator(s, cppEnum, "invert", "~");
writeFlagsUnaryOperator(s, cppEnum, "not", "!", true);
s << endl;
}
@@ -2405,11 +2405,11 @@ void CppGenerator::writeFlagsNumberMethodsDefinition(QTextStream& s, const Abstr
s << INDENT << "/*nb_remainder*/ 0," << endl;
s << INDENT << "/*nb_divmod*/ 0," << endl;
s << INDENT << "/*nb_power*/ 0," << endl;
- s << INDENT << "/*nb_negative*/ (unaryfunc)" << cpythonName << "___neg__," << endl;
+ s << INDENT << "/*nb_negative*/ 0," << endl;
s << INDENT << "/*nb_positive*/ 0," << endl;
s << INDENT << "/*nb_absolute*/ 0," << endl;
s << INDENT << "/*nb_nonzero*/ 0," << endl;
- s << INDENT << "/*nb_invert*/ 0," << endl;
+ s << INDENT << "/*nb_invert*/ (unaryfunc)" << cpythonName << "___invert__" << "," << endl;
s << INDENT << "/*nb_lshift*/ 0," << endl;
s << INDENT << "/*nb_rshift*/ 0," << endl;
s << INDENT << "/*nb_and*/ (binaryfunc)" << cpythonName << "___and__" << ',' << endl;