From fef2f47313e2ef7a948807f2565bf4ad5a2ff6c8 Mon Sep 17 00:00:00 2001 From: Atila Neves Date: Wed, 6 Nov 2019 12:28:02 +0100 Subject: [PATCH] Correctly use `in` in FreeBSD static asserts instead of `const` While currently `in` and `const` mean the same thing, they might not in the future. --- src/core/sys/freebsd/dlfcn.d | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/core/sys/freebsd/dlfcn.d b/src/core/sys/freebsd/dlfcn.d index e390743692..95b6c1dfba 100644 --- a/src/core/sys/freebsd/dlfcn.d +++ b/src/core/sys/freebsd/dlfcn.d @@ -86,16 +86,13 @@ static if (__BSD_VISIBLE) }; } -private template __externC(RT, P...) -{ - alias __externC = extern(C) RT function(P) nothrow @nogc; -} - /* XSI functions first. */ -static assert(is(typeof(&dlclose) == __externC!(int, void*))); -static assert(is(typeof(&dlerror) == __externC!(char*))); -static assert(is(typeof(&dlopen) == __externC!(void*, const char*, int))); -static assert(is(typeof(&dlsym) == __externC!(void*, void*, const char*))); +extern(C) { + static assert(is(typeof(&dlclose) == int function(void*))); + static assert(is(typeof(&dlerror) == char* function())); + static assert(is(typeof(&dlopen) == void* function(in char*, int))); + static assert(is(typeof(&dlsym) == void* function(void*, in char*))); +} static if (__BSD_VISIBLE) {