@@ -119,7 +119,6 @@ module deimos.openssl.crypto;
119
119
import deimos.openssl._d_util;
120
120
121
121
import core.stdc.stdlib ;
122
- import std.string : toStringz;
123
122
124
123
public import deimos.openssl.e_os2;
125
124
@@ -237,19 +236,19 @@ version (OPENSSL_NO_LOCKING) {
237
236
void CRYPTO_add ()(int * addr, int amount, int type) { * addr += amount; }
238
237
} else {
239
238
void CRYPTO_w_lock (string file = __FILE__ , size_t line = __LINE__ )(int type) {
240
- CRYPTO_lock(CRYPTO_LOCK |CRYPTO_WRITE ,type,file,line);
239
+ CRYPTO_lock(CRYPTO_LOCK |CRYPTO_WRITE ,type,file.ptr ,line);
241
240
}
242
241
void CRYPTO_w_unlock (string file = __FILE__ , size_t line = __LINE__ )(int type) {
243
- CRYPTO_lock(CRYPTO_UNLOCK |CRYPTO_WRITE ,type,file,line);
242
+ CRYPTO_lock(CRYPTO_UNLOCK |CRYPTO_WRITE ,type,file.ptr ,line);
244
243
}
245
244
void CRYPTO_r_lock (string file = __FILE__ , size_t line = __LINE__ )(int type) {
246
- CRYPTO_lock(CRYPTO_LOCK |CRYPTO_READ ,type,file,line);
245
+ CRYPTO_lock(CRYPTO_LOCK |CRYPTO_READ ,type,file.ptr ,line);
247
246
}
248
247
void CRYPTO_r_unlock (string file = __FILE__ , size_t line = __LINE__ )(int type) {
249
- CRYPTO_lock(CRYPTO_UNLOCK |CRYPTO_READ ,type,file,line);
248
+ CRYPTO_lock(CRYPTO_UNLOCK |CRYPTO_READ ,type,file.ptr ,line);
250
249
}
251
250
void CRYPTO_add (string file = __FILE__ , size_t line = __LINE__ )(int * addr, int amount, int type) {
252
- CRYPTO_add_lock(addr,amount,type,file,line);
251
+ CRYPTO_add_lock(addr,amount,type,file.ptr ,line);
253
252
}
254
253
}
255
254
@@ -369,25 +368,25 @@ int MemCheck_off()() { return CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE); }
369
368
alias CRYPTO_is_mem_check_on is_MemCheck_on;
370
369
371
370
auto OPENSSL_malloc (string file = __FILE__ , size_t line = __LINE__ )(int num) {
372
- return CRYPTO_malloc (num,file.toStringz ,line);
371
+ return CRYPTO_malloc (num,file.ptr ,line);
373
372
}
374
373
auto OPENSSL_strdup (string file = __FILE__ , size_t line = __LINE__ )(const (char )* str) {
375
- return CRYPTO_strdup (str,file,line);
374
+ return CRYPTO_strdup (str,file.ptr ,line);
376
375
}
377
376
auto OPENSSL_realloc (string file = __FILE__ , size_t line = __LINE__ )(void * addr, int num) {
378
- return CRYPTO_realloc (addr,num,file,line);
377
+ return CRYPTO_realloc (addr,num,file.ptr ,line);
379
378
}
380
379
auto OPENSSL_realloc_clean (string file = __FILE__ , size_t line = __LINE__ )(void * addr,int old_num,int num) {
381
- CRYPTO_realloc_clean(addr,old_num,num,file,line);
380
+ CRYPTO_realloc_clean(addr,old_num,num,file.ptr ,line);
382
381
}
383
382
auto OPENSSL_remalloc (string file = __FILE__ , size_t line = __LINE__ )(void ** addr, int num) {
384
- return CRYPTO_remalloc (cast (char ** )addr,num,file,line);
383
+ return CRYPTO_remalloc (cast (char ** )addr,num,file.ptr ,line);
385
384
}
386
385
alias CRYPTO_free OPENSSL_freeFunc;
387
386
alias CRYPTO_free OPENSSL_free;
388
387
389
388
auto OPENSSL_malloc_locked (string file = __FILE__ , size_t line = __LINE__ )(int num) {
390
- return CRYPTO_malloc_locked (num, file, line);
389
+ return CRYPTO_malloc_locked (num, file.ptr , line);
391
390
}
392
391
alias CRYPTO_free_locked OPENSSL_free_locked;
393
392
@@ -514,7 +513,7 @@ void CRYPTO_set_mem_debug_options(c_long bits);
514
513
c_long CRYPTO_get_mem_debug_options ();
515
514
516
515
auto CRYPTO_push_info (string file = __FILE__ , size_t line = __LINE__ )(const (char )* info) {
517
- return CRYPTO_push_info_ (info, file, line);
516
+ return CRYPTO_push_info_ (info, file.ptr , line);
518
517
}
519
518
int CRYPTO_push_info_ (const (char )* info, const (char )* file, int line);
520
519
int CRYPTO_pop_info ();
@@ -554,7 +553,7 @@ void CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB* cb);
554
553
/* die if we have to */
555
554
void OpenSSLDie (const (char )* file,int line,const (char )* assertion);
556
555
void OPENSSL_assert (string file = __FILE__ , size_t line = __LINE__ )(int e) {
557
- if (! e) OpenSSLDie(file, line, " assertion failed" ); // No good way to translate.
556
+ if (! e) OpenSSLDie(file.ptr , line, " assertion failed" ); // No good way to translate.
558
557
}
559
558
560
559
c_ulong* OPENSSL_ia32cap_loc ();
0 commit comments