(f: Function, fname: str)
| 1121 | |
| 1122 | |
| 1123 | def generate_virtual_impl(f: Function, fname: str) -> str: |
| 1124 | success = success_type |
| 1125 | name = f.name |
| 1126 | return_type = 'void' |
| 1127 | output_decls = '' |
| 1128 | output = '' |
| 1129 | largs = [] |
| 1130 | lparams = [] |
| 1131 | if f.returns: |
| 1132 | return_type = f.returns.type.str() |
| 1133 | output_decls = '\n'.join(f.returns.virtual_output_declarations()) |
| 1134 | largs += f.returns.virtual_output_args() |
| 1135 | output = f.returns.virtual_output() |
| 1136 | largs += [arg for p in f.params for arg in p.virtual_arg()] |
| 1137 | lparams += [ |
| 1138 | p.virtual_param() for p in f.params if not (p.this or p.hidden) |
| 1139 | ] |
| 1140 | args = ', '.join(largs) |
| 1141 | params = ', '.join(lparams) |
| 1142 | return c_api_virtual_impl.substitute(locals()) |
| 1143 | |
| 1144 | |
| 1145 | class Interface(Handle): |
no test coverage detected