diff options
author | Damien George <damien.p.george@gmail.com> | 2014-03-30 13:54:02 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-03-30 13:54:02 +0100 |
commit | df6567e6345c763182fa237a4497ab94ee6ffc20 (patch) | |
tree | 402a2bde9d55a10c204f8d766bda228b4f02b74a /py/map.c | |
parent | d17926db710189db97a49e9b2e72d782fc404231 (diff) |
Merge map.h into obj.h.
Pretty much everyone needs to include map.h, since it's such an integral
part of the Micro Python object implementation. Thus, the definitions
are now in obj.h instead. map.h is removed.
Diffstat (limited to 'py/map.c')
-rw-r--r-- | py/map.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -5,13 +5,12 @@ #include "qstr.h" #include "obj.h" #include "runtime0.h" -#include "map.h" // approximatelly doubling primes; made with Mathematica command: Table[Prime[Floor[(1.7)^n]], {n, 3, 24}] // prefixed with zero for the empty case. STATIC int doubling_primes[] = {0, 7, 19, 43, 89, 179, 347, 647, 1229, 2297, 4243, 7829, 14347, 26017, 47149, 84947, 152443, 273253, 488399, 869927, 1547173, 2745121, 4861607}; -int get_doubling_prime_greater_or_equal_to(int x) { +STATIC int get_doubling_prime_greater_or_equal_to(int x) { for (int i = 0; i < sizeof(doubling_primes) / sizeof(int); i++) { if (doubling_primes[i] >= x) { return doubling_primes[i]; |