File tree Expand file tree Collapse file tree 2 files changed +6
-15
lines changed Expand file tree Collapse file tree 2 files changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -8,19 +8,10 @@ package:
8
8
// Very boiled down version because we cannot use std.traits without causing
9
9
// DMD to create a ModuleInfo reference for _d_util, which would require users
10
10
// to include the Deimos files in the build.
11
-
12
- template ReturnType (T){
11
+ template ExternC (T) if (is (typeof (* (T.init)) P == function )) {
13
12
static if (is (typeof (* (T.init)) R == return )) {
14
- alias R ReturnType;
15
- }
16
- }
17
-
18
- template ParameterTypeTuple (T) {
19
- static if (is (typeof (* (T.init)) P == function )) {
20
- alias P ParameterTypeTuple;
13
+ static if (is (typeof (* (T.init)) P == function )) {
14
+ alias extern (C) R function (P) ExternC;
15
+ }
21
16
}
22
17
}
23
-
24
- template ExternC (T) {
25
- alias extern (C) ReturnType! T function (ParameterTypeTuple! T) ExternC;
26
- }
Original file line number Diff line number Diff line change @@ -693,7 +693,7 @@ enum SSL_SESSION_CACHE_MAX_SIZE_DEFAULT = (1024*20);
693
693
* supposed to be fixed at 16 bytes so the id will be padded after the callback
694
694
* returns in this case. It is also an error for the callback to set the size to
695
695
* zero. */
696
- alias ExternC! (int function (const ( SSL ) * ssl, ubyte * id,
696
+ alias ExternC! (int function (/+ FIXME: @@BUG7127@@ const+/ SSL * ssl, ubyte * id,
697
697
uint * id_len)) GEN_SESSION_CB ;
698
698
699
699
struct ssl_comp_st {
@@ -1133,7 +1133,7 @@ version(OPENSSL_NO_COMP) {
1133
1133
* 1 fail if verify fails */
1134
1134
ExternC! (int function (int ok,X509_STORE_CTX * ctx)) verify_callback; /* fail if callback returns 0 */
1135
1135
1136
- ExternC! (void function (const ( SSL ) * ssl,int type,int val)) info_callback; /* optional informational callback */
1136
+ ExternC! (void function (/+ FIXME: @@BUG7127@@ const+/ SSL * ssl,int type,int val)) info_callback; /* optional informational callback */
1137
1137
1138
1138
int error; /* error bytes to be written */
1139
1139
int error_code; /* actual code */
You can’t perform that action at this time.
0 commit comments