mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 20:20:14 +01:00
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>
This commit is contained in:
committed by
Damien George
parent
5ddf671944
commit
e8355eb163
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user