Skip to content

Commit

Permalink
Fix some functions not marked @nogc in older D frontends.
Browse files Browse the repository at this point in the history
  • Loading branch information
ponce committed Oct 3, 2016
1 parent 230aee3 commit 9eec9ff
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 7 additions & 1 deletion core/dplug/core/runtime.d
Expand Up @@ -5,6 +5,7 @@
*/
module dplug.core.runtime;

import gfm.core.memory;
import dplug.core.fpcontrol;

// Helpers to deal with the D runtime.
Expand All @@ -24,7 +25,12 @@ else version(Posix)
void* currentThreadId() nothrow @nogc
{
import core.sys.posix.pthread;
return cast(void*)(pthread_self());

return assumeNothrowNoGC(
()
{
return cast(void*)(pthread_self());
})();
}
}
else
Expand Down
6 changes: 5 additions & 1 deletion core/dplug/core/unchecked_sync.d
Expand Up @@ -93,7 +93,11 @@ struct UncheckedMutex
}
else version( Posix )
{
pthread_mutex_destroy(&m_hndl);
assumeNothrowNoGC(
(pthread_mutex_t* handle)
{
pthread_mutex_destroy(handle);
})(&m_hndl);
}
}
}
Expand Down

0 comments on commit 9eec9ff

Please sign in to comment.