Move BITS_PER_BYTE, BITS_PER_WORD to mpconfig.h for reuse.
This commit is contained in:
parent
fd17921b75
commit
fc5aac82cb
7
py/gc.c
7
py/gc.c
@ -8,15 +8,8 @@
|
|||||||
|
|
||||||
#if MICROPY_ENABLE_GC
|
#if MICROPY_ENABLE_GC
|
||||||
|
|
||||||
// a machine word is big enough to hold a pointer
|
|
||||||
/*
|
|
||||||
#define BYTES_PER_WORD (8)
|
|
||||||
typedef unsigned long machine_uint_t;
|
|
||||||
*/
|
|
||||||
typedef unsigned char byte;
|
typedef unsigned char byte;
|
||||||
|
|
||||||
#define BITS_PER_BYTE (8)
|
|
||||||
#define BITS_PER_WORD (BITS_PER_BYTE * BYTES_PER_WORD)
|
|
||||||
#define WORDS_PER_BLOCK (4)
|
#define WORDS_PER_BLOCK (4)
|
||||||
#define BYTES_PER_BLOCK (WORDS_PER_BLOCK * BYTES_PER_WORD)
|
#define BYTES_PER_BLOCK (WORDS_PER_BLOCK * BYTES_PER_WORD)
|
||||||
#define STACK_SIZE (64) // tunable; minimum is 1
|
#define STACK_SIZE (64) // tunable; minimum is 1
|
||||||
|
@ -76,6 +76,9 @@
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Miscellaneous settings */
|
/* Miscellaneous settings */
|
||||||
|
|
||||||
|
#define BITS_PER_BYTE (8)
|
||||||
|
#define BITS_PER_WORD (BITS_PER_BYTE * BYTES_PER_WORD)
|
||||||
|
|
||||||
// printf format spec to use for machine_int_t and friends
|
// printf format spec to use for machine_int_t and friends
|
||||||
#ifndef INT_FMT
|
#ifndef INT_FMT
|
||||||
#ifdef __LP64__
|
#ifdef __LP64__
|
||||||
|
Loading…
x
Reference in New Issue
Block a user