From: Martin v. Löwis Date: Wed, 4 Oct 2006 09:12:40 +0000 (+0000) Subject: Patch #1570253: Fix build problems caused by backports. X-Git-Tag: v2.4.4c1~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a50f9a4ea06eb8eb72751eb93713207ee34aab95;p=thirdparty%2FPython%2Fcpython.git Patch #1570253: Fix build problems caused by backports. --- diff --git a/PC/msvcrtmodule.c b/PC/msvcrtmodule.c index 4453023a6a8a..3311bd7fb4b2 100755 --- a/PC/msvcrtmodule.c +++ b/PC/msvcrtmodule.c @@ -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); diff --git a/PC/winsound.c b/PC/winsound.c index 0d22fa15f752..3f86fbecaab4 100644 --- a/PC/winsound.c +++ b/PC/winsound.c @@ -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);