aboutsummaryrefslogtreecommitdiff
path: root/py/objfloat.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-01-01 20:27:54 +0000
committerDamien George <damien.p.george@gmail.com>2015-01-01 20:32:09 +0000
commit51dfcb4bb7613ed164952712d9a5235a7b833cde (patch)
treec1856c7db0ff6d5ae51190be4325804a0aad43f4 /py/objfloat.c
parentdb1ac360c39aeedd28b6ef5d653faaa14c3ce01e (diff)
py: Move to guarded includes, everywhere in py/ core.
Addresses issue #1022.
Diffstat (limited to 'py/objfloat.c')
-rw-r--r--py/objfloat.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/py/objfloat.c b/py/objfloat.c
index b75d0e4ba..86b672007 100644
--- a/py/objfloat.c
+++ b/py/objfloat.c
@@ -30,26 +30,22 @@
#include <assert.h>
#include <math.h>
-#include "mpconfig.h"
-#include "nlr.h"
-#include "misc.h"
-#include "qstr.h"
-#include "obj.h"
-#include "parsenum.h"
-#include "runtime0.h"
-#include "runtime.h"
+#include "py/nlr.h"
+#include "py/parsenum.h"
+#include "py/runtime0.h"
+#include "py/runtime.h"
#if MICROPY_PY_BUILTINS_FLOAT
#if MICROPY_FLOAT_IMPL == MICROPY_FLOAT_IMPL_FLOAT
-#include "formatfloat.h"
+#include "py/formatfloat.h"
#endif
STATIC void float_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t o_in, mp_print_kind_t kind) {
mp_obj_float_t *o = o_in;
#if MICROPY_FLOAT_IMPL == MICROPY_FLOAT_IMPL_FLOAT
char buf[16];
- format_float(o->value, buf, sizeof(buf), 'g', 7, '\0');
+ mp_format_float(o->value, buf, sizeof(buf), 'g', 7, '\0');
print(env, "%s", buf);
if (strchr(buf, '.') == NULL && strchr(buf, 'e') == NULL) {
// Python floats always have decimal point