Skip to content

Commit

Permalink
Use va_arg instead of platform specific cast
Browse files Browse the repository at this point in the history
On ARM (EABI), va_list and therefore _argptr is not a pointer
and the pointer casts will fail.
  • Loading branch information
jpf91 committed Sep 27, 2012
1 parent 3a3fb02 commit 70bf827
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/runnable/test20.d
Expand Up @@ -594,7 +594,7 @@ void test30()

void foo31(...)
{
byte b = *cast(byte*)_argptr;
byte b = va_arg!byte(_argptr);
assert(b == 8);
}

Expand Down
2 changes: 1 addition & 1 deletion test/runnable/testdstress.d
Expand Up @@ -208,7 +208,7 @@ struct TestStruct
{
void add(...)
{
TestStruct other = *cast(TestStruct*)(_argptr);
TestStruct other = va_arg!TestStruct(_argptr);
foreach(int value; other)
{
foo();
Expand Down

0 comments on commit 70bf827

Please sign in to comment.