| 447 | } |
| 448 | |
| 449 | void das_module_bind_interop_function ( das_module * mod, das_module_group * lib, das_interop_function * fun, char * name, char * cppName, uint32_t sideffects, char* args ) { |
| 450 | auto fn = new CFunction(name, *(ModuleLibrary *)lib, cppName, fun); |
| 451 | fn->setSideEffects((das::SideEffects) sideffects); |
| 452 | vector <TypeDeclPtr> arguments; |
| 453 | MangledNameParser parser; |
| 454 | const char * arg = args; |
| 455 | while ( *arg ) { |
| 456 | auto tt = parser.parseTypeFromMangledName(arg, *(ModuleLibrary*)lib,(Module *)mod); |
| 457 | arguments.push_back(tt); |
| 458 | while (*arg==' ') arg ++; |
| 459 | } |
| 460 | fn->constructInterop(arguments); |
| 461 | ((Module *)mod)->addFunction(fn, false); |
| 462 | } |
| 463 | |
| 464 | void das_module_bind_interop_function_unaligned ( das_module * mod, das_module_group * lib, das_interop_function_unaligned * fun, char * name, char * cppName, uint32_t sideffects, char* args ) { |
| 465 | auto fn = new CFunction_Unaligned(name, *(ModuleLibrary *)lib, cppName, fun); |
no test coverage detected