py,extmod,stmhal: Use "static inline" for funcs that should be inline.

"STATIC inline" can expand to "inline" if STATIC is defined to nothing, and
this case can lead to link errors.
This commit is contained in:
Damien George
2017-08-02 13:42:34 +10:00
parent ee04525097
commit 0f12082f5b
3 changed files with 4 additions and 4 deletions

View File

@@ -281,13 +281,13 @@ STATIC mp_obj_t uctypes_struct_sizeof(mp_obj_t obj_in) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(uctypes_struct_sizeof_obj, uctypes_struct_sizeof);
STATIC inline mp_obj_t get_unaligned(uint val_type, byte *p, int big_endian) {
static inline mp_obj_t get_unaligned(uint val_type, byte *p, int big_endian) {
char struct_type = big_endian ? '>' : '<';
static const char type2char[16] = "BbHhIiQq------fd";
return mp_binary_get_val(struct_type, type2char[val_type], &p);
}
STATIC inline void set_unaligned(uint val_type, byte *p, int big_endian, mp_obj_t val) {
static inline void set_unaligned(uint val_type, byte *p, int big_endian, mp_obj_t val) {
char struct_type = big_endian ? '>' : '<';
static const char type2char[16] = "BbHhIiQq------fd";
mp_binary_set_val(struct_type, type2char[val_type], val, &p);