py: Move float e/pi consts to objfloat and make mp_obj_float_t private.

This commit is contained in:
Damien George
2015-08-20 23:42:35 +01:00
parent aaef1851a7
commit 7e359c648b
4 changed files with 17 additions and 20 deletions

View File

@@ -39,6 +39,14 @@
#include <math.h>
#include "py/formatfloat.h"
typedef struct _mp_obj_float_t {
mp_obj_base_t base;
mp_float_t value;
} mp_obj_float_t;
const mp_obj_float_t mp_const_float_e_obj = {{&mp_type_float}, M_E};
const mp_obj_float_t mp_const_float_pi_obj = {{&mp_type_float}, M_PI};
STATIC void float_print(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t kind) {
(void)kind;
mp_obj_float_t *o = o_in;