diff options
author | Philip Withnall <philip.withnall@collabora.co.uk> | 2014-06-09 14:55:25 +0100 |
---|---|---|
committer | Philip Withnall <philip.withnall@collabora.co.uk> | 2014-06-09 14:55:25 +0100 |
commit | 9feeb03d0c92008367bd7023fcac41e980b23f77 (patch) | |
tree | 5a8c7c6e51e7351b8595e9b0f492dfb493736b7a /clang-plugin/gsignal-checker.cpp | |
parent | eb33b69cb3b36eb18b5ef4fd803b48d8dfd7cbcd (diff) |
gsignal: Ensure string parameters to signal callbacks are expected const
Otherwise the handlers could modify the strings.
Diffstat (limited to 'clang-plugin/gsignal-checker.cpp')
-rw-r--r-- | clang-plugin/gsignal-checker.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang-plugin/gsignal-checker.cpp b/clang-plugin/gsignal-checker.cpp index 7ecf189..624edaa 100644 --- a/clang-plugin/gsignal-checker.cpp +++ b/clang-plugin/gsignal-checker.cpp @@ -336,7 +336,7 @@ _type_info_to_type (GITypeInfo *type_info, return context.getSizeType (); case GI_TYPE_TAG_UTF8: case GI_TYPE_TAG_FILENAME: - return context.getPointerType (context.CharTy); + return context.getPointerType (context.getConstType (context.CharTy)); case GI_TYPE_TAG_UNICHAR: return context.getIntTypeForBitwidth (32, false); /* Non-basic types */ |