mirror of
https://github.com/NixOS/nix.git
synced 2025-11-17 07:52:43 +01:00
Allow disabling some GC debug checks
This commit is contained in:
parent
a38a7b495c
commit
f7f73cf5ae
2 changed files with 11 additions and 9 deletions
|
|
@ -277,7 +277,15 @@ public:
|
|||
|
||||
bool isObject(void * p);
|
||||
|
||||
void assertObject(void * p);
|
||||
void assertObject(void * p)
|
||||
{
|
||||
#if GC_DEBUG
|
||||
if (!isObject(p)) {
|
||||
printError("object %p is not an object", p);
|
||||
abort();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
extern GC gc;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue