I am trying to map a structure definition using ctypes:
struct attrl {
struct attrl *next;
char *name;
char *resource;
char *value;
};
I'm not sure what to do with the “next” field of the structure in the ctypes mapping. Type Definition:
class attrl(Structure):
_fields_ = [
("next", attrl),
("name", c_char_p),
("resource", c_char_p),
("value", c_char_p)
]
leads to:
NameError: name 'attrl' is not defined
source
share