diff CodeAnalysis/ParseOrthancSDK.py @ 31:abe6dcd7f35e

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 12 May 2020 12:20:39 +0200
parents b2bbb516056e
children 23f3099bed47
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)