void SNetRouteNewDynamic(snet_dest_t dest) { snet_ast_t *ast = NULL; //FIXME snet_stream_t *stream; snet_info_t *info = SNetInfoInit(); SNetInfoSetTag(info, prevDest, (uintptr_t) SNetDestCopy(&dest), (void* (*)(void*)) &SNetDestCopy, &SNetMemFree); SNetRouteDynamicEnter(info, dest.dynamicIndex, dest.dynamicLoc, NULL); stream = SNetInstantiate(ast, NULL, info); SNetRouteUpdate(info, stream, dest.parentNode); SNetRouteDynamicExit(info, dest.dynamicIndex, dest.dynamicLoc, NULL); SNetInfoDestroy(info); }
void SNetRouteNewDynamic(snet_dest_t dest) { snet_startup_fun_t fun = SNetIdToNet(dest.parent); snet_info_t *info = SNetInfoInit(); SNetInfoSetTag(info, prevDest, (uintptr_t) SNetDestCopy(&dest), (void* (*)(void*)) &SNetDestCopy); SNetLocvecSet(info, SNetLocvecCreate()); SNetRouteDynamicEnter(info, dest.dynamicIndex, dest.dynamicLoc, NULL); //TODO may not need to update loc here SNetRouteUpdate(info, fun(NULL, info, dest.dynamicLoc), dest.parentNode); SNetRouteDynamicExit(info, dest.dynamicIndex, dest.dynamicLoc, NULL); SNetInfoDestroy(info); }