aboutsummaryrefslogtreecommitdiffstats
path: root/generator/cppgenerator.h
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-08-10 00:59:19 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:17:10 -0300
commit9c6b541ceef3039e9e19a1d9a12223851a849cf6 (patch)
treef3bf84cc9b86205fa2f7d7d5951b1e2dff29fcdd /generator/cppgenerator.h
parent711ee3d4169acca59b87df61b9ccb26d74a329b4 (diff)
Improved the generation of argument conversion in modified functions.
Added the SBK_UNUSED macro to libshiboken to prevent compilation warnings. An unit test was added. Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'generator/cppgenerator.h')
-rw-r--r--generator/cppgenerator.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/generator/cppgenerator.h b/generator/cppgenerator.h
index b6ce72ce7..18eb01be0 100644
--- a/generator/cppgenerator.h
+++ b/generator/cppgenerator.h
@@ -77,17 +77,19 @@ private:
* Writes Python to C++ conversions for arguments on Python wrappers.
* If implicit conversions, and thus new object allocation, are needed,
* code to deallocate a possible new instance is also generated.
- * \param s text stream to write
- * \param argType a pointer to the argument type to be converted
- * \param argName C++ argument name
- * \param pyArgName Python argument name
- * \param context the current meta class
- * \param defaultValue an optional default value to be used instead of the conversion result
+ * \param s text stream to write
+ * \param argType a pointer to the argument type to be converted
+ * \param argName C++ argument name
+ * \param pyArgName Python argument name
+ * \param context the current meta class
+ * \param defaultValue an optional default value to be used instead of the conversion result
+ * \param castArgumentAsUnused if true the converted argument is cast as unused to avoid compiler warnings
*/
void writeArgumentConversion(QTextStream& s, const AbstractMetaType* argType,
const QString& argName, const QString& pyArgName,
const AbstractMetaClass* context = 0,
- const QString& defaultValue = QString());
+ const QString& defaultValue = QString(),
+ bool castArgumentAsUnused = false);
/**
* Returns the AbstractMetaType for a function argument.