Mercurial > hg > CbC > CbC_gcc
view libphobos/testsuite/libphobos.shared/libloaddep.d @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 1830386684a0 |
children |
line wrap: on
line source
import core.runtime, core.sys.posix.dlfcn; extern(C) alias RunTests = int function(); extern(C) int runDepTests(const char* name) { auto h = rt_loadLibrary(name); if (h is null) return false; auto runTests = cast(RunTests).dlsym(h, "runTests"); assert(runTests !is null); if (!runTests()) return false; return rt_unloadLibrary(h); }