Larry Hastings added the comment: Serhiy: PyDoc_VAR is used in the "two-pass" approach as a forward declaration for docstrings. Imagine if, in winsound.c, sound_methods was defined above the "dump buffer" block. The expansion of WINSOUND_PLAYSOUND_METHODDEF would include a reference to winsound_PlaySound__doc__, which hadn't been defined yet.
winsound.c is simple enough, it doesn't need the two-pass approach. But two-pass would work well for _pickle.c, where there are four or five PyMethodDef structures in the middle of the file. Part of this is just Zachary experimenting with two-pass. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20323> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com