I'm trying to map a struct definition using ctypes:
struct attrl {
struct attrl *next;
char *name;
char *resource;
char *value;
};
I'm unsure what to do with the "next" field of the struct in the ctypes mapping. A definition like:
class attrl(Structure):
_fields_ = [
("next", attrl),
("name", c_char_p),
("resource", c_char_p),
("value", c_char_p)
]
results in:
NameError: name 'attrl' is not defined