Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 623748c

Browse files
committed
rt.memset: Use complex aliases instead of built-in complex types
1 parent af536e1 commit 623748c

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/rt/memset.d

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
*/
1515
module rt.memset;
1616

17+
import core.stdc.config;
18+
1719
extern (C)
1820
{
1921
// Functions from the C library.
@@ -68,10 +70,10 @@ long *_memset64(long *p, long value, size_t count)
6870
return pstart;
6971
}
7072

71-
cdouble *_memset128(cdouble *p, cdouble value, size_t count)
73+
c_complex_double *_memset128(c_complex_double *p, c_complex_double value, size_t count)
7274
{
73-
cdouble *pstart = p;
74-
cdouble *ptop;
75+
c_complex_double *pstart = p;
76+
c_complex_double *ptop;
7577

7678
for (ptop = &p[count]; p < ptop; p++)
7779
*p = value;
@@ -98,10 +100,10 @@ real *_memset80(real *p, real value, size_t count)
98100
return pstart;
99101
}
100102

101-
creal *_memset160(creal *p, creal value, size_t count)
103+
c_complex_real *_memset160(c_complex_real *p, c_complex_real value, size_t count)
102104
{
103-
creal *pstart = p;
104-
creal *ptop;
105+
c_complex_real *pstart = p;
106+
c_complex_real *ptop;
105107

106108
for (ptop = &p[count]; p < ptop; p++)
107109
*p = value;

0 commit comments

Comments
 (0)