Skip to content

Commit bc3b7f3

Browse files
committed
Try using extern(C) mangling
1 parent c72209c commit bc3b7f3

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/dmd/backend/cod2.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ int cdcmp_flag;
3333
extern signed char regtorm[8];
3434

3535
// from divcoeff.c
36-
extern bool choose_multiplier(int N, uint64_t d, int prec, uint64_t *pm, int *pshpost);
37-
extern bool udiv_coefficients(int N, uint64_t d, int *pshpre, uint64_t *pm, int *pshpost);
36+
//
37+
bool choose_multiplier(int N, uint64_t d, int prec, uint64_t *pm, int *pshpost);
38+
bool udiv_coefficients(int N, uint64_t d, int *pshpre, uint64_t *pm, int *pshpost);
3839

3940

4041
/*******************************

src/dmd/backend/divcoeff.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ void u128Div(ullong xh, ullong xl, ullong yh, ullong yl, ullong *pqh, ullong *pq
115115
* true m >= 2**N
116116
*/
117117

118-
bool choose_multiplier(int N, ullong d, int prec, ullong *pm, int *pshpost)
118+
extern(C++) bool choose_multiplier(int N, ullong d, int prec, ullong *pm, int *pshpost)
119119
{
120120
assert(N == 32 || N == 64);
121121
assert(prec <= N);
@@ -231,7 +231,7 @@ bool choose_multiplier(int N, ullong d, int prec, ullong *pm, int *pshpost)
231231
* q = SRL(MULUH(m, SRL(n, shpre)), shpost)
232232
*/
233233

234-
bool udiv_coefficients(int N, ullong d, int *pshpre, ullong *pm, int *pshpost)
234+
extern(C++) bool udiv_coefficients(int N, ullong d, int *pshpre, ullong *pm, int *pshpost)
235235
{
236236
bool mhighbit = choose_multiplier(N, d, N, pm, pshpost);
237237
if (mhighbit && (d & 1) == 0)

0 commit comments

Comments
 (0)