I am working on an open-source C file containing the following declaration
static PyTypeObject Bitarraytype;
followed later by the definition
static PyTypeObject Bitarraytype = {
/* A bunch of stuff */
};
I am porting this code to C++ (-std=C++2a
), however the above declaration and definition is no longer allowed, as it claims error: redefinition of 'Bitarraytype'
I'm not sure what's causing this, as the first block above is only a declaration from my understanding. Why doesn't this work in C++ and how can I get around it?