From 51dfcb4bb7613ed164952712d9a5235a7b833cde Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 1 Jan 2015 20:27:54 +0000 Subject: py: Move to guarded includes, everywhere in py/ core. Addresses issue #1022. --- py/objcomplex.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'py/objcomplex.c') diff --git a/py/objcomplex.c b/py/objcomplex.c index 2768a01e6..9e158fac6 100644 --- a/py/objcomplex.c +++ b/py/objcomplex.c @@ -28,21 +28,18 @@ #include #include -#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/obj.h" +#include "py/parsenum.h" +#include "py/runtime0.h" +#include "py/runtime.h" #if MICROPY_PY_BUILTINS_COMPLEX #include #if MICROPY_FLOAT_IMPL == MICROPY_FLOAT_IMPL_FLOAT -#include "formatfloat.h" +#include "py/formatfloat.h" #endif typedef struct _mp_obj_complex_t { @@ -58,12 +55,12 @@ STATIC void complex_print(void (*print)(void *env, const char *fmt, ...), void * #if MICROPY_FLOAT_IMPL == MICROPY_FLOAT_IMPL_FLOAT char buf[16]; if (o->real == 0) { - format_float(o->imag, buf, sizeof(buf), 'g', 7, '\0'); + mp_format_float(o->imag, buf, sizeof(buf), 'g', 7, '\0'); print(env, "%sj", buf); } else { - format_float(o->real, buf, sizeof(buf), 'g', 7, '\0'); + mp_format_float(o->real, buf, sizeof(buf), 'g', 7, '\0'); print(env, "(%s+", buf); - format_float(o->imag, buf, sizeof(buf), 'g', 7, '\0'); + mp_format_float(o->imag, buf, sizeof(buf), 'g', 7, '\0'); print(env, "%sj)", buf); } #else -- cgit v1.2.3