aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-08-03 12:02:07 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2017-08-22 11:04:01 +0000
commitecef77d751369cf7d66d5fccd110a30237755cdc (patch)
treeec1f6aa28f721c0156552d06af1bee23cdbe7148
parent22f4d90c272b51d4dd9a24de6d4e8b1446fb8145 (diff)
Shiboken2: Suppress warning for parameters modified by <array>
Add a check to checkTypeViability(), suppressing the warnings like There's no user provided way (conversion rule, argument removal, custom code, etc) to handle the primitive argument type 'const unsigned int *' in function 'QOpenGLShaderProgram::setUniformValueArray(const char * name, const unsigned int * values, int count)'. when the type was modified to be an array. Task-number: PYSIDE-354 Task-number: PYSIDE-516 Change-Id: Id5fa4789024cc82533d15a61b893a3f60baa4bff Reviewed-by: Christian Tismer <tismer@stackless.com>
-rw-r--r--sources/shiboken2/generator/shiboken2/cppgenerator.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
index 1f576cfe4..f7c47fd05 100644
--- a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
+++ b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
@@ -2116,6 +2116,7 @@ static void checkTypeViability(const AbstractMetaFunction* func, const AbstractM
if (!type
|| !type->typeEntry()->isPrimitive()
|| type->indirections() == 0
+ || (type->indirections() == 1 && type->typeUsagePattern() == AbstractMetaType::NativePointerAsArrayPattern)
|| ShibokenGenerator::isCString(type)
|| func->argumentRemoved(argIdx)
|| !func->typeReplaced(argIdx).isEmpty()