Skip to content

removing static members in pygccxml.declaration.* broke pyplusplus #22

@carsten-forty2

Description

@carsten-forty2

Applying the current commits leads to more problems regarding pyplusplus bubbling up .., e.g.,

File "/home/carsten/src/gimli/thirdParty/dist-GNU-4.8.3-64/pyplusplus/module_builder/boost_python_builder.py", line 373, in split_module
, encoding=self.encoding)
File "/home/carsten/src/gimli/thirdParty/dist-GNU-4.8.3-64/pyplusplus/file_writers/init.py", line 37, in write_multiple_files
mfs.write()
File "/home/carsten/src/gimli/thirdParty/dist-GNU-4.8.3-64/pyplusplus/file_writers/multiple_files.py", line 396, in write
self.split_classes()
File "/home/carsten/src/gimli/thirdParty/dist-GNU-4.8.3-64/pyplusplus/file_writers/multiple_files.py", line 300, in split_classes
for cls in class_creators: self.split_class(cls)
File "/home/carsten/src/gimli/thirdParty/dist-GNU-4.8.3-64/pyplusplus/file_writers/multiple_files.py", line 288, in split_class
self.split_class_impl( class_creator )
File "/home/carsten/src/gimli/thirdParty/dist-GNU-4.8.3-64/pyplusplus/file_writers/multiple_files.py", line 265, in split_class_impl
cpp_code = self.create_source( class_creator.alias, function_name, [class_creator] )
File "/home/carsten/src/gimli/thirdParty/dist-GNU-4.8.3-64/pyplusplus/file_writers/multiple_files.py", line 250, in create_source
answer.append( code_creators.code_creator_t.indent( creator.create() ) )
File "/home/carsten/src/gimli/thirdParty/dist-GNU-4.8.3-64/pyplusplus/code_creators/code_creator.py", line 107, in create
code = self._create_impl()
File "/home/carsten/src/gimli/thirdParty/dist-GNU-4.8.3-64/pyplusplus/code_creators/class_declaration.py", line 321, in _create_impl
return self._generate_code_with_scope()
File "/home/carsten/src/gimli/thirdParty/dist-GNU-4.8.3-64/pyplusplus/code_creators/class_declaration.py", line 302, in _generate_code_with_scope
result.append( '%s.%s;' % ( self.class_var_name, x.create() ) )
File "/home/carsten/src/gimli/thirdParty/dist-GNU-4.8.3-64/pyplusplus/code_creators/code_creator.py", line 107, in create
code = self._create_impl()
File "/home/carsten/src/gimli/thirdParty/dist-GNU-4.8.3-64/pyplusplus/code_creators/member_variable.py", line 161, in _create_impl
return self._generate_for_pointer()
File "/home/carsten/src/gimli/thirdParty/dist-GNU-4.8.3-64/pyplusplus/code_creators/member_variable.py", line 72, in _generate_for_pointer
, 'getter_type' : self.wrapper.getter_type
File "/home/carsten/src/gimli/thirdParty/dist-GNU-4.8.3-64/pyplusplus/code_creators/member_variable.py", line 227, in _get_getter_type
, with_defaults=False)
TypeError: create_decl_string() missing 1 required positional argument: 'self'

The corresponding part in pyplusplus reads:

return declarations.free_function_type_t.create_decl_string(
return_type=self.declaration.type
, arguments_types=arguments_types
, with_defaults=False)

which needs pygccxml/declarations.cpptyps.free_function_type_t.create_decl_string(...)
to be a static memberfunction, which seems to me a valid requisite in this context.

Bests and thanks for your afford.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions