Skip to content

Commit df6567e

Browse files
committed
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.
1 parent d17926d commit df6567e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+61
-116
lines changed

py/builtin.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include "obj.h"
99
#include "runtime0.h"
1010
#include "runtime.h"
11-
#include "map.h"
1211
#include "builtin.h"
1312

1413
#if MICROPY_ENABLE_FLOAT

py/builtinevex.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include "compile.h"
1313
#include "runtime0.h"
1414
#include "runtime.h"
15-
#include "map.h"
1615
#include "builtin.h"
1716

1817
STATIC mp_obj_t parse_compile_execute(mp_obj_t o_in, mp_parse_input_kind_t parse_input_kind) {

py/builtinimport.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include "compile.h"
1818
#include "runtime0.h"
1919
#include "runtime.h"
20-
#include "map.h"
2120
#include "builtin.h"
2221

2322
#define PATH_SEP_CHAR '/'

py/map.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55
#include "qstr.h"
66
#include "obj.h"
77
#include "runtime0.h"
8-
#include "map.h"
98

109
// approximatelly doubling primes; made with Mathematica command: Table[Prime[Floor[(1.7)^n]], {n, 3, 24}]
1110
// prefixed with zero for the empty case.
1211
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};
1312

14-
int get_doubling_prime_greater_or_equal_to(int x) {
13+
STATIC int get_doubling_prime_greater_or_equal_to(int x) {
1514
for (int i = 0; i < sizeof(doubling_primes) / sizeof(int); i++) {
1615
if (doubling_primes[i] >= x) {
1716
return doubling_primes[i];

py/map.h

Lines changed: 0 additions & 48 deletions
This file was deleted.

py/modarray.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#include "mpconfig.h"
33
#include "qstr.h"
44
#include "obj.h"
5-
#include "map.h"
65
#include "builtin.h"
76

87
STATIC const mp_map_elem_t mp_module_array_globals_table[] = {

py/modcollections.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#include "mpconfig.h"
33
#include "qstr.h"
44
#include "obj.h"
5-
#include "map.h"
65
#include "builtin.h"
76

87
STATIC const mp_map_elem_t mp_module_collections_globals_table[] = {

py/modmath.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include "mpconfig.h"
55
#include "qstr.h"
66
#include "obj.h"
7-
#include "map.h"
87
#include "builtin.h"
98

109
#if MICROPY_ENABLE_FLOAT

py/modmicropython.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#include "mpconfig.h"
33
#include "qstr.h"
44
#include "obj.h"
5-
#include "map.h"
65
#include "builtin.h"
76

87
// Various builtins specific to MicroPython runtime,

py/obj.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include "obj.h"
1010
#include "runtime0.h"
1111
#include "runtime.h"
12-
#include "map.h"
1312

1413
mp_obj_type_t *mp_obj_get_type(mp_obj_t o_in) {
1514
if (MP_OBJ_IS_SMALL_INT(o_in)) {

0 commit comments

Comments
 (0)