Benjamin Peterson <benja...@python.org> added the comment: Yeah, I've run into this before. The "correct" thing to do is use C99 VLAs. Unfortunately, that doesn't work for PyDictKeysObject because it really wants a union of VLAs but that isn't supported. The best I could do is making a struct for every possible member of the union. See the attached patch. I didn't land it because it's gross. OTOH, undefined behavior is bad, so I'm okay landing this if you don't find it too revolting.
---------- keywords: +patch Added file: https://bugs.python.org/file47541/horrible.patch _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33312> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com