]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Patch #1570253: Fix build problems caused by backports.
authorMartin v. Löwis <martin@v.loewis.de>
Wed, 4 Oct 2006 09:12:40 +0000 (09:12 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Wed, 4 Oct 2006 09:12:40 +0000 (09:12 +0000)
PC/msvcrtmodule.c
PC/winsound.c

index 4453023a6a8acd95d26117a78e006db06511c772..3311bd7fb4b2af638376459a875bef24451e7e9d 100755 (executable)
@@ -220,10 +220,11 @@ static struct PyMethodDef msvcrt_functions[] = {
 PyMODINIT_FUNC
 initmsvcrt(void)
 {
+       PyObject *d;
        PyObject *m = Py_InitModule("msvcrt", msvcrt_functions);
        if (m == NULL)
                return;
-       PyObject *d = PyModule_GetDict(m);
+       d = PyModule_GetDict(m);
 
        /* constants for the locking() function's mode argument */
        insertint(d, "LK_LOCK", _LK_LOCK);
index 0d22fa15f752f8ddc60c316d3570c1da6f23e81b..3f86fbecaab4b823f3e1cc46b0c22b170c4de649 100644 (file)
@@ -215,12 +215,13 @@ initwinsound(void)
 {
        OSVERSIONINFO version;
 
+       PyObject *dict;
        PyObject *module = Py_InitModule3("winsound",
                                          sound_methods,
                                          sound_module_doc);
        if (module == NULL)
                return;
-       PyObject *dict = PyModule_GetDict(module);
+       dict = PyModule_GetDict(module);
 
        ADD_DEFINE(SND_ASYNC);
        ADD_DEFINE(SND_NODEFAULT);