py: Move to guarded includes, everywhere in py/ core.
Addresses issue #1022.
diff --git a/py/objcomplex.c b/py/objcomplex.c
index 2768a01..9e158fa 100644
--- a/py/objcomplex.c
+++ b/py/objcomplex.c
@@ -28,21 +28,18 @@
#include <stdio.h>
#include <assert.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/obj.h"
+#include "py/parsenum.h"
+#include "py/runtime0.h"
+#include "py/runtime.h"
#if MICROPY_PY_BUILTINS_COMPLEX
#include <math.h>
#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 @@
#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