I came across this in the Python interpreter source code.
void
PyThread_delete_key_value(int key)
{
long id = PyThread_get_thread_ident();
struct key *p, **q;
The interesting part being the struct key *p, **q; call. What exactly is this structure doing? I’m confused as to what exactly this is a struct of. Is this not the same as say, this?
struct 1 *p;
I are confused.
Edit:
Even though this has been answered, I should clear up my question. It was specifically the fact that the word key was reused and that I didn’t know that the compiler considers them in different namespaces.
key exists in two different namespaces here. Once as a variable, once as a structure. The compiler knows that ‘struct key’ and int key are different things.