Code:
#ifdef DICT_SETUP_CLASS
#undef DICT_SETUP_CLASS
#endif
#define DICT_REGISTER_CLASS(classname) \
I think you can just #define something regardless of whether it already exists or not, so you may not need that #undef.