changeset 31:abe6dcd7f35e

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 12 May 2020 12:20:39 +0200
parents a3642e761a58
children 30161a429a91
files CodeAnalysis/ParseOrthancSDK.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/CodeAnalysis/ParseOrthancSDK.py	Thu Apr 30 06:58:12 2020 +0200
+++ b/CodeAnalysis/ParseOrthancSDK.py	Tue May 12 12:20:39 2020 +0200
@@ -398,9 +398,14 @@
                   IsClassType(args[1].type) and
                   CheckOnlySupportedArguments(args[2:])):
                 print('Simple method of class %s, returning bytes: %s' % (
-                    args[0].type.get_pointee().spelling,
+                    args[1].type.get_pointee().spelling,
                     node.spelling))
                
+                className = args[1].type.get_pointee().spelling
+
+                if className.startswith('const '):
+                    className = className[len('const '):]
+
                 method = GenerateFunctionBodyTemplate(node.spelling, args[0].type, args[2:])
                 method['self'] = ', self->object_'
                 classes[className]['methods'].append(method)