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,20 +202,8 @@ class CClass(CObject): ...@@ -202,20 +202,8 @@ class CClass(CObject):[name].setter = f[name].setter = f
def __addClassMethod(self, f): def __addClassMethod(self, f):
name =[len(self.cFunctionPrefix):] if not in self.classMethods:
if name.startswith('get_') and len(f.arguments) == 0: self.classMethods[] = f
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
def __addInstanceMethod(self, f): def __addInstanceMethod(self, f):
name =[len(self.cFunctionPrefix):] name =[len(self.cFunctionPrefix):]
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