summaryrefslogtreecommitdiffstatshomepage
path: root/extmod/modnetwork.h
diff options
context:
space:
mode:
authorJim Mussared <jim.mussared@gmail.com>2022-04-22 13:05:56 +1000
committerDamien George <damien@micropython.org>2022-09-19 19:06:04 +1000
commite8355eb16357b0bd234a9bcab1c9e8b72fcdbabc (patch)
tree894b411f743d6d285f0ed34c6685e9a33818b1cf /extmod/modnetwork.h
parent5ddf671944465411f90bd0968550b719d0dbdb80 (diff)
downloadmicropython-e8355eb16357b0bd234a9bcab1c9e8b72fcdbabc.tar.gz
micropython-e8355eb16357b0bd234a9bcab1c9e8b72fcdbabc.zip
py/obj: Add "full" and "empty" non-variable-length mp_obj_type_t.
This will always have the maximum/minimum size of a mp_obj_type_t representation and can be used as a member in other structs. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'extmod/modnetwork.h')
-rw-r--r--extmod/modnetwork.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/extmod/modnetwork.h b/extmod/modnetwork.h
index 3481cc6dcc..55ee4eb4d3 100644
--- a/extmod/modnetwork.h
+++ b/extmod/modnetwork.h
@@ -62,7 +62,8 @@ mp_obj_t mod_network_nic_ifconfig(struct netif *netif, size_t n_args, const mp_o
struct _mod_network_socket_obj_t;
typedef struct _mod_network_nic_type_t {
- mp_obj_type_t base;
+ // Ensure that this struct is big enough to hold any type size.
+ mp_obj_full_type_t base;
// API for non-socket operations
int (*gethostbyname)(mp_obj_t nic, const char *name, mp_uint_t len, uint8_t *ip_out);