Commit 07381345 authored by Ghislain MARY's avatar Ghislain MARY

Fix automatic wrapper generation where class methods were considered to be instance properties.

parent fc2e9efe
......@@ -202,18 +202,6 @@ class CClass(CObject):[name].setter = f
def __addClassMethod(self, f):
name =[len(self.cFunctionPrefix):]
if name.startswith('get_') and len(f.arguments) == 0:
self.__addPropertyGetter(name[4:], f)
elif name.startswith('is_') and len(f.arguments) == 0 and f.returnArgument.ctype == 'bool_t':
self.__addPropertyGetter(name[3:], f)
elif name.endswith('_enabled') and len(f.arguments) == 0 and f.returnArgument.ctype == 'bool_t':
self.__addPropertyGetter(name, f)
elif name.startswith('set_') and len(f.arguments) == 1:
self.__addPropertySetter(name[4:], f)
elif name.startswith('enable_') and len(f.arguments) == 1 and f.arguments[0].ctype == 'bool_t':
self.__addPropertySetter(name[7:] + '_enabled', f)
if not in self.classMethods:
self.classMethods[] = f
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment