summaryrefslogtreecommitdiffstatshomepage
path: root/py
diff options
context:
space:
mode:
Diffstat (limited to 'py')
-rw-r--r--py/asmarm.c2
-rw-r--r--py/formatfloat.c16
-rw-r--r--py/mkrules.mk2
-rw-r--r--py/objtype.c2
-rw-r--r--py/runtime.c2
5 files changed, 12 insertions, 12 deletions
diff --git a/py/asmarm.c b/py/asmarm.c
index da07680e31..ff22aba90a 100644
--- a/py/asmarm.c
+++ b/py/asmarm.c
@@ -135,7 +135,7 @@ STATIC uint asm_arm_op_orr_reg(uint rd, uint rn, uint rm) {
void asm_arm_bkpt(asm_arm_t *as) {
// bkpt #0
- emit_al(as, 0x1200070);
+ emit_al(as, 0x1200070);
}
// locals:
diff --git a/py/formatfloat.c b/py/formatfloat.c
index ea5a07977b..2f10d425a8 100644
--- a/py/formatfloat.c
+++ b/py/formatfloat.c
@@ -161,7 +161,7 @@ int mp_format_float(FPTYPE f, char *buf, size_t buf_size, char fmt, int prec, ch
if (fmt == 'g' && prec == 0) {
prec = 1;
}
- int e, e1;
+ int e, e1;
int dec = 0;
char e_sign = '\0';
int num_digits = 0;
@@ -209,7 +209,7 @@ int mp_format_float(FPTYPE f, char *buf, size_t buf_size, char fmt, int prec, ch
e_sign_char = '+';
}
} else if (fp_isless1(f)) {
- e++;
+ e++;
f *= FPCONST(10.0);
}
@@ -232,7 +232,7 @@ int mp_format_float(FPTYPE f, char *buf, size_t buf_size, char fmt, int prec, ch
num_digits = prec;
if (num_digits) {
- *s++ = '.';
+ *s++ = '.';
while (--e && num_digits) {
*s++ = '0';
num_digits--;
@@ -266,7 +266,7 @@ int mp_format_float(FPTYPE f, char *buf, size_t buf_size, char fmt, int prec, ch
f *= FPCONST(0.1);
}
- // If the user specified fixed format (fmt == 'f') and e makes the
+ // If the user specified fixed format (fmt == 'f') and e makes the
// number too big to fit into the available buffer, then we'll
// switch to the 'e' format.
@@ -327,7 +327,7 @@ int mp_format_float(FPTYPE f, char *buf, size_t buf_size, char fmt, int prec, ch
if (prec == 0) {
prec = 1;
}
- num_digits = prec;
+ num_digits = prec;
}
// Print the digits of the mantissa
@@ -365,7 +365,7 @@ int mp_format_float(FPTYPE f, char *buf, size_t buf_size, char fmt, int prec, ch
if (rs == buf) {
break;
}
- rs--;
+ rs--;
}
if (*rs == '0') {
// We need to insert a 1
@@ -380,13 +380,13 @@ int mp_format_float(FPTYPE f, char *buf, size_t buf_size, char fmt, int prec, ch
e_sign = '+';
}
} else {
- e++;
+ e++;
}
} else {
// Need at extra digit at the end to make room for the leading '1'
s++;
}
- char *ss = s;
+ char *ss = s;
while (ss > rs) {
*ss = ss[-1];
ss--;
diff --git a/py/mkrules.mk b/py/mkrules.mk
index 00ed279176..e660820016 100644
--- a/py/mkrules.mk
+++ b/py/mkrules.mk
@@ -6,7 +6,7 @@ endif
# This file expects that OBJ contains a list of all of the object files.
# The directory portion of each object file is used to locate the source
-# and should not contain any ..'s but rather be relative to the top of the
+# and should not contain any ..'s but rather be relative to the top of the
# tree.
#
# So for example, py/map.c would have an object file name py/map.o
diff --git a/py/objtype.c b/py/objtype.c
index 2a119e40fb..0c0826cf93 100644
--- a/py/objtype.c
+++ b/py/objtype.c
@@ -375,7 +375,7 @@ STATIC mp_obj_t instance_unary_op(mp_uint_t op, mp_obj_t self_in) {
if (member[0] == MP_OBJ_NULL) {
// https://docs.python.org/3/reference/datamodel.html#object.__hash__
// "User-defined classes have __eq__() and __hash__() methods by default;
- // with them, all objects compare unequal (except with themselves) and
+ // with them, all objects compare unequal (except with themselves) and
// x.__hash__() returns an appropriate value such that x == y implies
// both that x is y and hash(x) == hash(y)."
return MP_OBJ_NEW_SMALL_INT((mp_uint_t)self_in);
diff --git a/py/runtime.c b/py/runtime.c
index a8a1f73fa4..ecc3ae2f51 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -127,7 +127,7 @@ void mp_deinit(void) {
//mp_obj_dict_free(&dict_main);
//mp_map_deinit(&MP_STATE_VM(mp_loaded_modules_map));
- // call port specific deinitialization if any
+ // call port specific deinitialization if any
#ifdef MICROPY_PORT_INIT_FUNC
MICROPY_PORT_DEINIT_FUNC;
#endif