Move some #define's into base-impl.h.

This commit is contained in:
Nigel Tao committed 2017-10-21 15:16:55 +11:00
1 parent 6815375de5
commit 709d34f8e2
5 files changed
+51 -48

No files matched your search

+14
View File
@@ -19,6 +19,20 @@
#define PUFFS_IGNORE_POTENTIALLY_UNUSED_VARIABLE(x) (void)(x)
// PUFFS_MAGIC is a magic number to check that initializers are called. It's
// not foolproof, given C doesn't automatically zero memory before use, but it
// should catch 99.99% of cases.
//
// Its (non-zero) value is arbitrary, based on md5sum("puffs").
#define PUFFS_MAGIC (0xCB3699CCU)
// PUFFS_ALREADY_ZEROED is passed from a container struct's initializer to a
// containee struct's initializer when the container has already zeroed the
// containee's memory.
//
// Its (non-zero) value is arbitrary, based on md5sum("zeroed").
#define PUFFS_ALREADY_ZEROED (0x68602EF1U)
// Use switch cases for coroutine suspension points, similar to the technique
// in https://www.chiark.greenend.org.uk/~sgtatham/coroutines.html
//