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

Commit

Permalink
avoid strict purity inference by passing void pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
rainers committed Mar 23, 2014
1 parent dd367da commit 9ae17d0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/core/exception.d
Expand Up @@ -509,7 +509,7 @@ extern (C) void onHiddenFuncError( Object o ) @safe pure nothrow
* Throws:
* OutOfMemoryError.
*/
extern (C) void onOutOfMemoryError() @trusted pure nothrow
extern (C) void onOutOfMemoryError(void* pretend_sideffect = null) @trusted pure nothrow /* dmd @@@BUG11461@@@ */
{
// NOTE: Since an out of memory condition exists, no allocation must occur
// while generating this object.
Expand All @@ -524,7 +524,7 @@ extern (C) void onOutOfMemoryError() @trusted pure nothrow
* Throws:
* InvalidMemoryOperationError.
*/
extern (C) void onInvalidMemoryOperationError() @trusted pure nothrow
extern (C) void onInvalidMemoryOperationError(void* pretend_sideffect = null) @trusted pure nothrow /* dmd @@@BUG11461@@@ */
{
// The same restriction applies as for onOutOfMemoryError. The GC is in an
// undefined state, thus no allocation must occur while generating this object.
Expand Down
2 changes: 1 addition & 1 deletion src/gc/bits.d
Expand Up @@ -19,7 +19,7 @@ import core.stdc.string;
import core.stdc.stdlib;


private extern (C) void onOutOfMemoryError() @trusted /* pure dmd @@@BUG11461@@@ */ nothrow;
private extern (C) void onOutOfMemoryError(void* pretend_sideffect = null) @trusted pure nothrow; /* dmd @@@BUG11461@@@ */


version (DigitalMars)
Expand Down
4 changes: 2 additions & 2 deletions src/gc/gc.d
Expand Up @@ -108,8 +108,8 @@ private
alias void delegate(void*, void*) scanFn;
extern (C) void thread_scanAll(scope scanFn fn);

extern (C) void onOutOfMemoryError() @trusted /* pure dmd @@@BUG11461@@@ */ nothrow;
extern (C) void onInvalidMemoryOperationError() @trusted /* pure dmd @@@BUG11461@@@ */ nothrow;
extern (C) void onOutOfMemoryError(void* pretend_sideffect = null) @trusted pure nothrow; /* dmd @@@BUG11461@@@ */
extern (C) void onInvalidMemoryOperationError(void* pretend_sideffect = null) @trusted pure nothrow; /* dmd @@@BUG11461@@@ */

enum
{
Expand Down
2 changes: 1 addition & 1 deletion src/gcstub/gc.d
Expand Up @@ -47,7 +47,7 @@ private
}

extern (C) void thread_init();
extern (C) void onOutOfMemoryError() @trusted /* pure dmd @@@BUG11461@@@ */ nothrow;
extern (C) void onOutOfMemoryError(void* pretend_sideffect = null) @trusted pure nothrow; /* dmd @@@BUG11461@@@ */

struct Proxy
{
Expand Down
2 changes: 1 addition & 1 deletion src/object_.d
Expand Up @@ -30,7 +30,7 @@ private
import rt.minfo;
debug(PRINTF) import core.stdc.stdio;

extern (C) void onOutOfMemoryError() @trusted /* pure dmd @@@BUG11461@@@ */ nothrow;
extern (C) void onOutOfMemoryError(void* pretend_sideffect = null) @trusted pure nothrow; /* dmd @@@BUG11461@@@ */
extern (C) Object _d_newclass(const TypeInfo_Class ci);
extern (C) void _d_arrayshrinkfit(const TypeInfo ti, void[] arr) nothrow;
extern (C) size_t _d_arraysetcapacity(const TypeInfo ti, size_t newcapacity, void *arrptr) pure nothrow;
Expand Down

0 comments on commit 9ae17d0

Please sign in to comment.