Skip to content

Commit

Permalink
Remove uses of in on extern(C) functions in druntime
Browse files Browse the repository at this point in the history
  • Loading branch information
Geod24 committed Mar 3, 2023
1 parent a98ae26 commit b4db844
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 29 deletions.
24 changes: 12 additions & 12 deletions druntime/src/rt/aApply.d
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Params:
Returns:
non-zero when the loop was exited through a `break`
*/
extern (C) int _aApplycd1(in char[] aa, dg_t dg)
extern (C) int _aApplycd1(scope const(char)[] aa, dg_t dg)
{
int result;
size_t len = aa.length;
Expand Down Expand Up @@ -132,7 +132,7 @@ unittest
}

/// ditto
extern (C) int _aApplywd1(in wchar[] aa, dg_t dg)
extern (C) int _aApplywd1(scope const(wchar)[] aa, dg_t dg)
{
int result;
size_t len = aa.length;
Expand Down Expand Up @@ -193,7 +193,7 @@ unittest
}

/// ditto
extern (C) int _aApplycw1(in char[] aa, dg_t dg)
extern (C) int _aApplycw1(scope const(char)[] aa, dg_t dg)
{
int result;
size_t len = aa.length;
Expand Down Expand Up @@ -267,7 +267,7 @@ unittest
}

/// ditto
extern (C) int _aApplywc1(in wchar[] aa, dg_t dg)
extern (C) int _aApplywc1(scope const(wchar)[] aa, dg_t dg)
{
int result;
size_t len = aa.length;
Expand Down Expand Up @@ -347,7 +347,7 @@ unittest
}

/// ditto
extern (C) int _aApplydc1(in dchar[] aa, dg_t dg)
extern (C) int _aApplydc1(scope const(dchar)[] aa, dg_t dg)
{
int result;

Expand Down Expand Up @@ -423,7 +423,7 @@ unittest
}

/// ditto
extern (C) int _aApplydw1(in dchar[] aa, dg_t dg)
extern (C) int _aApplydw1(scope const(dchar)[] aa, dg_t dg)
{
int result;

Expand Down Expand Up @@ -508,7 +508,7 @@ extern (D) alias dg2_t = int delegate(void* i, void* c);
/**
Variants of _aApplyXXX that include a loop index.
*/
extern (C) int _aApplycd2(in char[] aa, dg2_t dg)
extern (C) int _aApplycd2(scope const(char)[] aa, dg2_t dg)
{
int result;
size_t len = aa.length;
Expand Down Expand Up @@ -576,7 +576,7 @@ unittest
}

/// ditto
extern (C) int _aApplywd2(in wchar[] aa, dg2_t dg)
extern (C) int _aApplywd2(scope const(wchar)[] aa, dg2_t dg)
{
int result;
size_t len = aa.length;
Expand Down Expand Up @@ -644,7 +644,7 @@ unittest
}

/// ditto
extern (C) int _aApplycw2(in char[] aa, dg2_t dg)
extern (C) int _aApplycw2(scope const(char)[] aa, dg2_t dg)
{
int result;
size_t len = aa.length;
Expand Down Expand Up @@ -723,7 +723,7 @@ unittest
}

/// ditto
extern (C) int _aApplywc2(in wchar[] aa, dg2_t dg)
extern (C) int _aApplywc2(scope const(wchar)[] aa, dg2_t dg)
{
int result;
size_t len = aa.length;
Expand Down Expand Up @@ -808,7 +808,7 @@ unittest
}

/// ditto
extern (C) int _aApplydc2(in dchar[] aa, dg2_t dg)
extern (C) int _aApplydc2(scope const(dchar)[] aa, dg2_t dg)
{
int result;
size_t len = aa.length;
Expand Down Expand Up @@ -888,7 +888,7 @@ unittest
}

/// ditto
extern (C) int _aApplydw2(in dchar[] aa, dg2_t dg)
extern (C) int _aApplydw2(scope const(dchar)[] aa, dg2_t dg)
{ int result;

debug(apply) printf("_aApplydw2(), len = %d\n", aa.length);
Expand Down
24 changes: 12 additions & 12 deletions druntime/src/rt/aApplyR.d
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Params:
Returns:
non-zero when the loop was exited through a `break`
*/
extern (C) int _aApplyRcd1(in char[] aa, dg_t dg)
extern (C) int _aApplyRcd1(scope const(char)[] aa, dg_t dg)
{ int result;

debug(apply) printf("_aApplyRcd1(), len = %d\n", aa.length);
Expand Down Expand Up @@ -107,7 +107,7 @@ unittest
}

/// ditto
extern (C) int _aApplyRwd1(in wchar[] aa, dg_t dg)
extern (C) int _aApplyRwd1(scope const(wchar)[] aa, dg_t dg)
{ int result;

debug(apply) printf("_aApplyRwd1(), len = %d\n", aa.length);
Expand Down Expand Up @@ -170,7 +170,7 @@ unittest
}

/// ditto
extern (C) int _aApplyRcw1(in char[] aa, dg_t dg)
extern (C) int _aApplyRcw1(scope const(char)[] aa, dg_t dg)
{ int result;

debug(apply) printf("_aApplyRcw1(), len = %d\n", aa.length);
Expand Down Expand Up @@ -256,7 +256,7 @@ unittest
}

/// ditto
extern (C) int _aApplyRwc1(in wchar[] aa, dg_t dg)
extern (C) int _aApplyRwc1(scope const(wchar)[] aa, dg_t dg)
{ int result;

debug(apply) printf("_aApplyRwc1(), len = %d\n", aa.length);
Expand Down Expand Up @@ -340,7 +340,7 @@ unittest
}

/// ditto
extern (C) int _aApplyRdc1(in dchar[] aa, dg_t dg)
extern (C) int _aApplyRdc1(scope const(dchar)[] aa, dg_t dg)
{ int result;

debug(apply) printf("_aApplyRdc1(), len = %d\n", aa.length);
Expand Down Expand Up @@ -418,7 +418,7 @@ unittest
}

/// ditto
extern (C) int _aApplyRdw1(in dchar[] aa, dg_t dg)
extern (C) int _aApplyRdw1(scope const(dchar)[] aa, dg_t dg)
{ int result;

debug(apply) printf("_aApplyRdw1(), len = %d\n", aa.length);
Expand Down Expand Up @@ -502,7 +502,7 @@ extern (D) alias dg2_t = int delegate(void* i, void* c);
/**
Variants of _aApplyRXXX that include a loop index.
*/
extern (C) int _aApplyRcd2(in char[] aa, dg2_t dg)
extern (C) int _aApplyRcd2(scope const(char)[] aa, dg2_t dg)
{ int result;
size_t i;
size_t len = aa.length;
Expand Down Expand Up @@ -578,7 +578,7 @@ unittest
}

/// ditto
extern (C) int _aApplyRwd2(in wchar[] aa, dg2_t dg)
extern (C) int _aApplyRwd2(scope const(wchar)[] aa, dg2_t dg)
{ int result;

debug(apply) printf("_aApplyRwd2(), len = %d\n", aa.length);
Expand Down Expand Up @@ -643,7 +643,7 @@ unittest
}

/// ditto
extern (C) int _aApplyRcw2(in char[] aa, dg2_t dg)
extern (C) int _aApplyRcw2(scope const(char)[] aa, dg2_t dg)
{ int result;

debug(apply) printf("_aApplyRcw2(), len = %d\n", aa.length);
Expand Down Expand Up @@ -731,7 +731,7 @@ unittest
}

/// ditto
extern (C) int _aApplyRwc2(in wchar[] aa, dg2_t dg)
extern (C) int _aApplyRwc2(scope const(wchar)[] aa, dg2_t dg)
{ int result;

debug(apply) printf("_aApplyRwc2(), len = %d\n", aa.length);
Expand Down Expand Up @@ -817,7 +817,7 @@ unittest
}

/// ditto
extern (C) int _aApplyRdc2(in dchar[] aa, dg2_t dg)
extern (C) int _aApplyRdc2(scope const(dchar)[] aa, dg2_t dg)
{ int result;

debug(apply) printf("_aApplyRdc2(), len = %d\n", aa.length);
Expand Down Expand Up @@ -896,7 +896,7 @@ unittest
}

/// ditto
extern (C) int _aApplyRdw2(in dchar[] aa, dg2_t dg)
extern (C) int _aApplyRdw2(scope const(dchar)[] aa, dg2_t dg)
{ int result;

debug(apply) printf("_aApplyRdw2(), len = %d\n", aa.length);
Expand Down
6 changes: 3 additions & 3 deletions druntime/src/rt/lifetime.d
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,7 @@ extern (C) void* _d_newitemU(scope const TypeInfo _ti) pure nothrow @weak
}

/// ditto
extern (C) void* _d_newitemT(in TypeInfo _ti) pure nothrow @weak
extern (C) void* _d_newitemT(const TypeInfo _ti) pure nothrow @weak
{
import core.stdc.string;
auto p = _d_newitemU(_ti);
Expand All @@ -1206,7 +1206,7 @@ extern (C) void* _d_newitemT(in TypeInfo _ti) pure nothrow @weak
}

/// Same as above, for item with non-zero initializer.
extern (C) void* _d_newitemiT(in TypeInfo _ti) pure nothrow @weak
extern (C) void* _d_newitemiT(const TypeInfo _ti) pure nothrow @weak
{
import core.stdc.string;
auto p = _d_newitemU(_ti);
Expand Down Expand Up @@ -1286,7 +1286,7 @@ extern (C) CollectHandler rt_getCollectHandler()
/**
*
*/
extern (C) int rt_hasFinalizerInSegment(void* p, size_t size, uint attr, in void[] segment) nothrow
extern (C) int rt_hasFinalizerInSegment(void* p, size_t size, uint attr, scope const(void)[] segment) nothrow
{
if (attr & BlkAttr.STRUCTFINAL)
{
Expand Down
4 changes: 2 additions & 2 deletions druntime/src/rt/tracegc.d
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ extern (C) void[] _d_newarrayU(const scope TypeInfo ti, size_t length);
extern (C) void[] _d_newarrayiT(const TypeInfo ti, size_t length);
extern (C) void[] _d_newarraymTX(const TypeInfo ti, size_t[] dims);
extern (C) void[] _d_newarraymiTX(const TypeInfo ti, size_t[] dims);
extern (C) void* _d_newitemT(in TypeInfo ti);
extern (C) void* _d_newitemiT(in TypeInfo ti);
extern (C) void* _d_newitemT(const TypeInfo ti);
extern (C) void* _d_newitemiT(const TypeInfo ti);
extern (C) void _d_callfinalizer(void* p);
extern (C) void _d_callinterfacefinalizer(void *p);
extern (C) void _d_delclass(Object* p);
Expand Down

0 comments on commit b4db844

Please sign in to comment.