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

Commit

Permalink
fix x2
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Stepanov committed Oct 4, 2014
1 parent d236d1c commit 7c37851
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/object.di
Expand Up @@ -384,7 +384,7 @@ extern (C)
void* _aaRangeFrontValue(AARange r) pure nothrow @nogc;
void _aaRangePopFront(ref AARange r) pure nothrow @nogc;

void* _d_assocarrayliteralTX(const TypeInfo_AssociativeArray ti, void[] keys, void[] values) @trusted pure;
void* _d_assocarrayliteralTX(const TypeInfo_AssociativeArray ti, void[] keys, void[] values) pure;
}

auto aaLiteral(Key, Value, T...)(auto ref T args) if (T.length % 2 == 0)
Expand All @@ -409,12 +409,13 @@ auto aaLiteral(Key, Value, T...)(auto ref T args) if (T.length % 2 == 0)

void[] key_slice;
void[] value_slice;

void *ret;
() @trusted {
key_slice = *cast(void[]*)&keys;
value_slice = *cast(void[]*)&values;
ret = _d_assocarrayliteralTX(typeid(Value[Key]), key_slice, value_slice);
}();
return _d_assocarrayliteralTX(typeid(Value[Key]), key_slice, value_slice);
return ret;
}
}

Expand Down
7 changes: 4 additions & 3 deletions src/object_.d
Expand Up @@ -1980,7 +1980,7 @@ extern (C)
int _aaEqual(in TypeInfo tiRaw, in void* e1, in void* e2);
hash_t _aaGetHash(in void* aa, in TypeInfo tiRaw) nothrow;

void* _d_assocarrayliteralTX(const TypeInfo_AssociativeArray ti, void[] keys, void[] values) @trusted pure;
void* _d_assocarrayliteralTX(const TypeInfo_AssociativeArray ti, void[] keys, void[] values) pure;
}

auto aaLiteral(Key, Value, T...)(auto ref T args) if (T.length % 2 == 0)
Expand All @@ -2005,12 +2005,13 @@ auto aaLiteral(Key, Value, T...)(auto ref T args) if (T.length % 2 == 0)

void[] key_slice;
void[] value_slice;

void *ret;
() @trusted {
key_slice = *cast(void[]*)&keys;
value_slice = *cast(void[]*)&values;
ret = _d_assocarrayliteralTX(typeid(Value[Key]), key_slice, value_slice);
}();
return _d_assocarrayliteralTX(typeid(Value[Key]), key_slice, value_slice);
return ret;
}
}

Expand Down

0 comments on commit 7c37851

Please sign in to comment.