`Module *mod = sc->module;` would work.