summaryrefslogtreecommitdiffstatshomepage
path: root/py
diff options
context:
space:
mode:
Diffstat (limited to 'py')
-rw-r--r--py/asmthumb.c2
-rw-r--r--py/builtinimport.c4
-rw-r--r--py/compile.c4
-rw-r--r--py/misc.h2
-rw-r--r--py/mkenv.mk2
-rw-r--r--py/mpconfig.h2
-rw-r--r--py/obj.c2
-rw-r--r--py/objstr.c4
-rw-r--r--py/py.mk2
-rw-r--r--py/ringbuf.h2
-rw-r--r--py/stream.c2
-rw-r--r--py/vm.c4
12 files changed, 16 insertions, 16 deletions
diff --git a/py/asmthumb.c b/py/asmthumb.c
index 749c1e405b..7e92e4de41 100644
--- a/py/asmthumb.c
+++ b/py/asmthumb.c
@@ -52,7 +52,7 @@ void asm_thumb_end_pass(asm_thumb_t *as) {
#if defined(MCU_SERIES_F7)
if (as->base.pass == MP_ASM_PASS_EMIT) {
- // flush D-cache, so the code emited is stored in memory
+ // flush D-cache, so the code emitted is stored in memory
SCB_CleanDCache_by_Addr((uint32_t*)as->base.code_base, as->base.code_size);
// invalidate I-cache
SCB_InvalidateICache();
diff --git a/py/builtinimport.c b/py/builtinimport.c
index d01ebbe73f..6994fc48f4 100644
--- a/py/builtinimport.c
+++ b/py/builtinimport.c
@@ -271,7 +271,7 @@ mp_obj_t mp_builtin___import__(size_t n_args, const mp_obj_t *args) {
if (level != 0) {
// What we want to do here is to take name of current module,
// chop <level> trailing components, and concatenate with passed-in
- // module name, thus resolving relative import name into absolue.
+ // module name, thus resolving relative import name into absolute.
// This even appears to be correct per
// http://legacy.python.org/dev/peps/pep-0328/#relative-imports-and-name
// "Relative imports use a module's __name__ attribute to determine that
@@ -441,7 +441,7 @@ mp_obj_t mp_builtin___import__(size_t n_args, const mp_obj_t *args) {
#if MICROPY_CPYTHON_COMPAT
// Store module as "__main__" in the dictionary of loaded modules (returned by sys.modules).
mp_obj_dict_store(MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_loaded_modules_dict)), MP_OBJ_NEW_QSTR(MP_QSTR___main__), module_obj);
- // Store real name in "__main__" attribute. Choosen semi-randonly, to reuse existing qstr's.
+ // Store real name in "__main__" attribute. Chosen semi-randonly, to reuse existing qstr's.
mp_obj_dict_store(MP_OBJ_FROM_PTR(o->globals), MP_OBJ_NEW_QSTR(MP_QSTR___main__), MP_OBJ_NEW_QSTR(mod_name));
#endif
}
diff --git a/py/compile.c b/py/compile.c
index 8533e0528f..3b6a264d61 100644
--- a/py/compile.c
+++ b/py/compile.c
@@ -939,7 +939,7 @@ STATIC void c_del_stmt(compiler_t *comp, mp_parse_node_t pn) {
}
}
} else {
- // some arbitrary statment that we can't delete (eg del 1)
+ // some arbitrary statement that we can't delete (eg del 1)
goto cannot_delete;
}
@@ -1090,7 +1090,7 @@ STATIC void compile_import_name(compiler_t *comp, mp_parse_node_struct_t *pns) {
STATIC void compile_import_from(compiler_t *comp, mp_parse_node_struct_t *pns) {
mp_parse_node_t pn_import_source = pns->nodes[0];
- // extract the preceeding .'s (if any) for a relative import, to compute the import level
+ // extract the preceding .'s (if any) for a relative import, to compute the import level
uint import_level = 0;
do {
mp_parse_node_t pn_rel;
diff --git a/py/misc.h b/py/misc.h
index 146b9a8e4a..caa5945bf2 100644
--- a/py/misc.h
+++ b/py/misc.h
@@ -197,7 +197,7 @@ int DEBUG_printf(const char *fmt, ...);
extern mp_uint_t mp_verbose_flag;
// This is useful for unicode handling. Some CPU archs has
-// special instructions for efficient implentation of this
+// special instructions for efficient implementation of this
// function (e.g. CLZ on ARM).
// NOTE: this function is unused at the moment
#ifndef count_lead_ones
diff --git a/py/mkenv.mk b/py/mkenv.mk
index eb1e44fef5..b167b2533d 100644
--- a/py/mkenv.mk
+++ b/py/mkenv.mk
@@ -32,7 +32,7 @@ ifeq ($(BUILD_VERBOSE),0)
$(info Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.)
endif
-# default settings; can be overriden in main Makefile
+# default settings; can be overridden in main Makefile
PY_SRC ?= $(TOP)/py
BUILD ?= build
diff --git a/py/mpconfig.h b/py/mpconfig.h
index a61d431e5a..78e346d734 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -32,7 +32,7 @@
// mpconfigport.h is a file containing configuration settings for a
// particular port. mpconfigport.h is actually a default name for
-// such config, and it can be overriden using MP_CONFIGFILE preprocessor
+// such config, and it can be overridden using MP_CONFIGFILE preprocessor
// define (you can do that by passing CFLAGS_EXTRA='-DMP_CONFIGFILE="<file.h>"'
// argument to make when using standard MicroPython makefiles).
// This is useful to have more than one config per port, for example,
diff --git a/py/obj.c b/py/obj.c
index 98ffa930b5..493945a227 100644
--- a/py/obj.c
+++ b/py/obj.c
@@ -401,7 +401,7 @@ mp_obj_t mp_obj_id(mp_obj_t o_in) {
return MP_OBJ_NEW_SMALL_INT(id);
} else {
// If that didn't work, well, let's return long int, just as
- // a (big) positve value, so it will never clash with the range
+ // a (big) positive value, so it will never clash with the range
// of small int returned in previous case.
return mp_obj_new_int_from_uint((mp_uint_t)id);
}
diff --git a/py/objstr.c b/py/objstr.c
index 70de0a693a..a1e2235720 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -798,7 +798,7 @@ STATIC mp_obj_t str_uni_strip(int type, size_t n_args, const mp_obj_t *args) {
}
assert(last_good_char_pos >= first_good_char_pos);
- //+1 to accomodate the last character
+ //+1 to accommodate the last character
size_t stripped_len = last_good_char_pos - first_good_char_pos + 1;
if (stripped_len == orig_str_len) {
// If nothing was stripped, don't bother to dup original string
@@ -1811,7 +1811,7 @@ STATIC mp_obj_t str_islower(mp_obj_t self_in) {
}
#if MICROPY_CPYTHON_COMPAT
-// These methods are superfluous in the presense of str() and bytes()
+// These methods are superfluous in the presence of str() and bytes()
// constructors.
// TODO: should accept kwargs too
STATIC mp_obj_t bytes_decode(size_t n_args, const mp_obj_t *args) {
diff --git a/py/py.mk b/py/py.mk
index 5ff1fd6a6c..70891677d6 100644
--- a/py/py.mk
+++ b/py/py.mk
@@ -25,7 +25,7 @@ ifeq ($(MICROPY_SSL_AXTLS),1)
CFLAGS_MOD += -DMICROPY_SSL_AXTLS=1 -I../lib/axtls/ssl -I../lib/axtls/crypto -I../lib/axtls/config
LDFLAGS_MOD += -Lbuild -laxtls
else ifeq ($(MICROPY_SSL_MBEDTLS),1)
-# Can be overriden by ports which have "builtin" mbedTLS
+# Can be overridden by ports which have "builtin" mbedTLS
MICROPY_SSL_MBEDTLS_INCLUDE ?= ../lib/mbedtls/include
CFLAGS_MOD += -DMICROPY_SSL_MBEDTLS=1 -I$(MICROPY_SSL_MBEDTLS_INCLUDE)
LDFLAGS_MOD += -L../lib/mbedtls/library -lmbedx509 -lmbedtls -lmbedcrypto
diff --git a/py/ringbuf.h b/py/ringbuf.h
index 5662594f76..5e108afad7 100644
--- a/py/ringbuf.h
+++ b/py/ringbuf.h
@@ -33,7 +33,7 @@ typedef struct _ringbuf_t {
uint16_t iput;
} ringbuf_t;
-// Static initalization:
+// Static initialization:
// byte buf_array[N];
// ringbuf_t buf = {buf_array, sizeof(buf_array)};
diff --git a/py/stream.c b/py/stream.c
index c915110e0b..d3fc767bbd 100644
--- a/py/stream.c
+++ b/py/stream.c
@@ -51,7 +51,7 @@ STATIC mp_obj_t stream_readall(mp_obj_t self_in);
#define STREAM_CONTENT_TYPE(stream) (((stream)->is_text) ? &mp_type_str : &mp_type_bytes)
// Returns error condition in *errcode, if non-zero, return value is number of bytes written
-// before error condition occured. If *errcode == 0, returns total bytes written (which will
+// before error condition occurred. If *errcode == 0, returns total bytes written (which will
// be equal to input size).
mp_uint_t mp_stream_rw(mp_obj_t stream, void *buf_, mp_uint_t size, int *errcode, byte flags) {
byte *buf = buf_;
diff --git a/py/vm.c b/py/vm.c
index 5094e3e450..ad3d9e29c8 100644
--- a/py/vm.c
+++ b/py/vm.c
@@ -947,7 +947,7 @@ unwind_jump:;
DECODE_UINT;
// unum & 0xff == n_positional
// (unum >> 8) & 0xff == n_keyword
- // We have folowing stack layout here:
+ // We have following stack layout here:
// fun arg0 arg1 ... kw0 val0 kw1 val1 ... seq dict <- TOS
sp -= (unum & 0xff) + ((unum >> 7) & 0x1fe) + 2;
#if MICROPY_STACKLESS
@@ -1018,7 +1018,7 @@ unwind_jump:;
DECODE_UINT;
// unum & 0xff == n_positional
// (unum >> 8) & 0xff == n_keyword
- // We have folowing stack layout here:
+ // We have following stack layout here:
// fun self arg0 arg1 ... kw0 val0 kw1 val1 ... seq dict <- TOS
sp -= (unum & 0xff) + ((unum >> 7) & 0x1fe) + 3;
#if MICROPY_STACKLESS