MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / das_module_bind_interop_function

Function das_module_bind_interop_function

src/misc/daScriptC.cpp:449–462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

447}
448
449void 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
464void 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);

Calls 5

setSideEffectsMethod · 0.80
constructInteropMethod · 0.80
push_backMethod · 0.45
addFunctionMethod · 0.45

Tested by

no test coverage detected