summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Lechner <david@pybricks.com>2022-10-08 17:32:22 -0500
committerDamien George <damien@micropython.org>2022-10-12 00:33:09 +1100
commitab317a0d66005ea88f162994130f61d0d488db93 (patch)
tree3db76f31c69606bc7d9b9b10b893dbf0ebab0bc7
parent92d911803812100fac109b6108ab005e7bbd4c82 (diff)
py/misc: Remove use of bitfield from vstr_t.
Since there is only one flag, we don't need to use a bitfield in vstr_t. Compilers emit extra instructions to access a bitfield, so this should reduce the binary size a small amount. Signed-off-by: David Lechner <david@pybricks.com>
-rw-r--r--py/misc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/misc.h b/py/misc.h
index 7350d2f9b..32061a009 100644
--- a/py/misc.h
+++ b/py/misc.h
@@ -179,7 +179,7 @@ typedef struct _vstr_t {
size_t alloc;
size_t len;
char *buf;
- bool fixed_buf : 1;
+ bool fixed_buf;
} vstr_t;
// convenience macro to declare a vstr with a fixed size buffer on the stack