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 -14
View File
@@ -336,6 +336,20 @@ puffs_flate__status puffs_flate__zlib_decoder__decode(
#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
//
@@ -709,20 +723,6 @@ uint32_t puffs_flate__adler32__update(puffs_flate__adler32* self,
// ---------------- Initializer Implementations
// 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)
void puffs_flate__flate_decoder__initialize(puffs_flate__flate_decoder* self,
uint32_t puffs_version,
uint32_t for_internal_use_only) {
+14 -14
View File
@@ -282,6 +282,20 @@ puffs_gif__status puffs_gif__lzw_decoder__decode(puffs_gif__lzw_decoder* self,
#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
//
@@ -579,20 +593,6 @@ puffs_gif__status puffs_gif__decoder__decode_id(puffs_gif__decoder* self,
// ---------------- Initializer Implementations
// 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)
void puffs_gif__lzw_decoder__initialize(puffs_gif__lzw_decoder* self,
uint32_t puffs_version,
uint32_t for_internal_use_only) {