1
1
Fork 0
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:
Eelco Dolstra 2019-04-23 13:56:38 +02:00
parent a38a7b495c
commit f7f73cf5ae
2 changed files with 11 additions and 9 deletions

View file

@ -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;