The function declarations were updated to use `const scope', but the
static asserts were not.
libphobos/ChangeLog:
* libdruntime/core/sys/dragonflybsd/dlfcn.d: Update static assert.
* libdruntime/core/sys/freebsd/dlfcn.d: Likewise.
* libdruntime/core/sys/netbsd/dlfcn.d: Likewise.
* libdruntime/core/sys/posix/dlfcn.d: Replace 'in' with 'const scope'.
(cherry picked from commit
7677b501341d84e9889ddf0f3834b5d1ad2922f9)
alias dlfunc_t = void function(__dlfunc_arg);
-private template __externC(RT, P...)
-{
- alias __externC = extern(C) RT function(P) nothrow @nogc @system;
-}
-
/* 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(const scope char*, int)));
+ static assert(is(typeof(&dlsym) == void* function(void*, const scope char*)));
+}
void* fdlopen(int, int);
int dladdr(const(void)*, Dl_info*);
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 assert(is(typeof(&dlopen) == void* function(const scope char*, int)));
+ static assert(is(typeof(&dlsym) == void* function(void*, const scope char*)));
}
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(const scope char*, int)));
+ static assert(is(typeof(&dlsym) == void* function(void*, const scope char*)));
+}
static if (__BSD_VISIBLE)
{
int dlclose(void*);
char* dlerror();
- void* dlopen(in char*, int);
- void* dlsym(void*, in char*);
+ void* dlopen(const scope char*, int);
+ void* dlsym(void*, const scope char*);
int dladdr(const(void)* addr, Dl_info* info);
struct Dl_info