8000 Move mp_obj_int_t definition to objint.h, to reuse in long int impls. · ronc/micropython@76a90f2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 76a90f2

Browse files
committed
Move mp_obj_int_t definition to objint.h, to reuse in long int impls.
1 parent f62d33a commit 76a90f2

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

py/objint.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,7 @@
88
#include "mpconfig.h"
99
#include "mpqstr.h"
1010
#include "obj.h"
11-
12-
typedef struct _mp_obj_int_t {
13-
mp_obj_base_t base;
14-
#if MICROPY_LONGINT_IMPL != MICROPY_LONGINT_IMPL_NONE
15-
mp_longint_impl_t val;
16-
#endif
17-
} mp_obj_int_t;
18-
19-
void int_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t self_in);
20-
mp_obj_t int_binary_op(int op, mp_obj_t lhs_in, mp_obj_t rhs_in);
11+
#include "objint.h"
2112

2213
// This dispatcher function is expected to be independent of the implementation
2314
// of long int

py/objint.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
typedef struct _mp_obj_int_t {
2+
mp_obj_base_t base;
3+
#if MICROPY_LONGINT_IMPL != MICROPY_LONGINT_IMPL_NONE
4+
mp_longint_impl_t val;
5+
#endif
6+
} mp_obj_int_t;
7+
8+
void int_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t self_in);
9+
mp_obj_t int_binary_op(int op, mp_obj_t lhs_in, mp_obj_t rhs_in);

0 commit comments

Comments
 (0)
0