Skip to content

Commit 9bb07be

Browse files
authored
Merge pull request #36 from carblue/master
crypto.d: Fix template OPENSSL_malloc
2 parents beab824 + 1b3f6d9 commit 9bb07be

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

deimos/openssl/crypto.d

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -236,19 +236,19 @@ version (OPENSSL_NO_LOCKING) {
236236
void CRYPTO_add()(int* addr, int amount, int type) { *addr += amount; }
237237
} else {
238238
void CRYPTO_w_lock(string file = __FILE__, size_t line = __LINE__)(int type) {
239-
CRYPTO_lock(CRYPTO_LOCK|CRYPTO_WRITE,type,file,line);
239+
CRYPTO_lock(CRYPTO_LOCK|CRYPTO_WRITE,type,file.ptr,line);
240240
}
241241
void CRYPTO_w_unlock(string file = __FILE__, size_t line = __LINE__)(int type) {
242-
CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_WRITE,type,file,line);
242+
CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_WRITE,type,file.ptr,line);
243243
}
244244
void CRYPTO_r_lock(string file = __FILE__, size_t line = __LINE__)(int type) {
245-
CRYPTO_lock(CRYPTO_LOCK|CRYPTO_READ,type,file,line);
245+
CRYPTO_lock(CRYPTO_LOCK|CRYPTO_READ,type,file.ptr,line);
246246
}
247247
void CRYPTO_r_unlock(string file = __FILE__, size_t line = __LINE__)(int type) {
248-
CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_READ,type,file,line);
248+
CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_READ,type,file.ptr,line);
249249
}
250250
void CRYPTO_add(string file = __FILE__, size_t line = __LINE__)(int* addr, int amount, int type) {
251-
CRYPTO_add_lock(addr,amount,type,file,line);
251+
CRYPTO_add_lock(addr,amount,type,file.ptr,line);
252252
}
253253
}
254254

@@ -368,25 +368,25 @@ int MemCheck_off()() { return CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE); }
368368
alias CRYPTO_is_mem_check_on is_MemCheck_on;
369369

370370
auto OPENSSL_malloc(string file = __FILE__, size_t line = __LINE__)(int num) {
371-
return CRYPTO_malloc(num,file,line);
371+
return CRYPTO_malloc(num,file.ptr,line);
372372
}
373373
auto OPENSSL_strdup(string file = __FILE__, size_t line = __LINE__)(const(char)* str) {
374-
return CRYPTO_strdup(str,file,line);
374+
return CRYPTO_strdup(str,file.ptr,line);
375375
}
376376
auto OPENSSL_realloc(string file = __FILE__, size_t line = __LINE__)(void* addr, int num) {
377-
return CRYPTO_realloc(addr,num,file,line);
377+
return CRYPTO_realloc(addr,num,file.ptr,line);
378378
}
379379
auto OPENSSL_realloc_clean(string file = __FILE__, size_t line = __LINE__)(void* addr,int old_num,int num) {
380-
CRYPTO_realloc_clean(addr,old_num,num,file,line);
380+
CRYPTO_realloc_clean(addr,old_num,num,file.ptr,line);
381381
}
382382
auto OPENSSL_remalloc(string file = __FILE__, size_t line = __LINE__)(void** addr, int num) {
383-
return CRYPTO_remalloc(cast(char**)addr,num,file,line);
383+
return CRYPTO_remalloc(cast(char**)addr,num,file.ptr,line);
384384
}
385385
alias CRYPTO_free OPENSSL_freeFunc;
386386
alias CRYPTO_free OPENSSL_free;
387387

388388
auto OPENSSL_malloc_locked(string file = __FILE__, size_t line = __LINE__)(int num) {
389-
return CRYPTO_malloc_locked(num, file, line);
389+
return CRYPTO_malloc_locked(num, file.ptr, line);
390390
}
391391
alias CRYPTO_free_locked OPENSSL_free_locked;
392392

@@ -513,7 +513,7 @@ void CRYPTO_set_mem_debug_options(c_long bits);
513513
c_long CRYPTO_get_mem_debug_options();
514514

515515
auto CRYPTO_push_info(string file = __FILE__, size_t line = __LINE__)(const(char)* info) {
516-
return CRYPTO_push_info_(info, file, line);
516+
return CRYPTO_push_info_(info, file.ptr, line);
517517
}
518518
int CRYPTO_push_info_(const(char)* info, const(char)* file, int line);
519519
int CRYPTO_pop_info();
@@ -553,7 +553,7 @@ void CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB* cb);
553553
/* die if we have to */
554554
void OpenSSLDie(const(char)* file,int line,const(char)* assertion);
555555
void OPENSSL_assert(string file = __FILE__, size_t line = __LINE__)(int e) {
556-
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.
557557
}
558558

559559
c_ulong* OPENSSL_ia32cap_loc();

0 commit comments

Comments
 (0)